|
|
back to boardSolution!!! program _1110; {$APPTYPE CONSOLE} uses SysUtils; Var N,i,o,m,y,x:cardinal; Exist:boolean; begin Exist:=false; Readln(n,m,y); For I:=0 to m-1 do begin x:=i; For o:=2 to n do X:=x*i mod m; if x=y then begin exist:=true; Write(i,' '); end; End; if not exist then write('-1'); end. Re: Solution!!! you good man |
|
|