Pagini recente » Cod sursa (job #1670404) | Cod sursa (job #3168937) | Cod sursa (job #2330422) | Cod sursa (job #1511401) | Cod sursa (job #581365)
Cod sursa(job #581365)
var a,b:longint; f:text;
function putere(x,n:longint):int64;
begin
if n=0 then putere:=1 mod 1999999973 else
if n mod 2=0 then putere:=sqr(putere(x,n div 2))mod 1999999973 else
putere:=x*sqr(putere(x,(n-1) div 2))mod 1999999973;
end;
begin
assign(f,'lgput.in');
reset(f);
readln(f,a,b);
close(f);
assign(f,'lgput.out');
rewrite(f);
writeln(f,putere(a,b));
close(f);
end.