Pagini recente » Cod sursa (job #1284802) | Cod sursa (job #1611005) | Cod sursa (job #189548) | Cod sursa (job #1279762) | Cod sursa (job #1200895)
var x,y: int64;
i,j:longint;
fi,fo: text;
function putere(x,y:int64):int64;
var p,i:int64;
begin
if y=0 then begin
putere:=1;exit;
end;
p:=x;
i:=1;
while (i*2<=y) do begin
p:=(p*p) mod 1999999973;
i:=i*2;
end;
p:=p*putere(x,y-i) mod 1999999973;
putere:=p;
end;
begin
assign(fi,'lgput.in');
assign(fo,'lgput.out');
reset(fi);
rewrite(fo);
readln(fi,x,y);
writeln(fo,putere(x,y)mod 1999999973);
close(fo);
close(fi);
end.