|
|
back to boardShow all messages Hide all messagesI got WA on test 7. Is there some tricks on it? int modFunction(int a,int b) { int c=a%b; b=(b<0)?(-b):b; if(c<0) return c+b; return c; } is this correct? func Mod(a,b: int): int; var Res: int; { Res:=a%b; if Res<0 then Res:=Res+abs(b); return Res; } |
|
|