Pagini recente » Cod sursa (job #2809711) | Cod sursa (job #1098230) | Cod sursa (job #475428) | Cod sursa (job #3003867) | Cod sursa (job #1112088)
program sds;
var n,p,z,i:longint; f:text;
function putere(x,n:longint):int64;
begin
if n=0 then putere:=1
else if n=1 then putere:=x
else if odd(n) then putere:=x*sqr(putere(x,n div 2))
else putere:=sqr(putere(x,n div 2));
end;
begin
assign(f,'lgput.in'); reset(f);
read(f,n);
read(f,p);
close(f);
assign(f,'lgput.out'); rewrite(f);
z:=putere(n,p) mod 1999999973;
write(f,z);
close(f);
end.