Search found 2 matches

by deliric01
Fri Apr 21, 2006 7:36 pm
Forum: Volume 3 (300-399)
Topic: 374 - Big Mod
Replies: 79
Views: 11773

If I am not mistakeing I belive u just told me to change type to int64 and that is what I did but still WA.
by deliric01
Wed Apr 19, 2006 8:10 pm
Forum: Volume 3 (300-399)
Topic: 374 - Big Mod
Replies: 79
Views: 11773

Could anyone tell me why my code gets WA?? var r,b,p,m:longint; function bigmod (var b,p,m:longint):longint; var rez:longint; begin if p=0 then rez:=1 else if p mod 2 =0 then begin p:=p div 2; rez:=sqr(bigmod (b,p,m)) mod m; end else begin dec (p); rez:=((b mod m)*bigmod (b,p,m) mod m) mod m; end; b...

Go to advanced search