PersonalCorpus 版 (精华区)
149166 13:57:12 1 Mar 2002
Bozhang,HIT,P.R.China 1110 Pascal Accepted 0.12 sec 49K
var
i,j,x,m,n,y:integer;
flag:boolean;
begin
readln(n,m,y);
flag:=false;
for x:=0 to m-1 do begin
i:=1;
for j:=1 to n do i:=(i*x) mod m;
if i=y then begin write(x,' '); flag:=true; end;
end;
if not flag then writeln(-1);
end.
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:3.347毫秒