|
|
вернуться в форумHELP PLEASE!!! WA#6 var n,m,y,i:integer; x:int64; found:boolean; function pow(x,a:integer):int64; var i:integer; res:int64; begin res:=1; for i:=1 to a do res:=res*x; pow:=res; end; begin found:=false; readln(n,m,y); for i:=0 to m-1 do begin x:=pow(i,n) mod m; if x=y then begin found:=true; write(i,' '); end; end; if not Found then writeln('-1'); end. |
|
|