Pagini recente » Cod sursa (job #1312011) | Borderou de evaluare (job #1066669) | Cod sursa (job #840380) | Cod sursa (job #1212527) | Cod sursa (job #1565042)
var n,p:integer;
f,g:text;
function PL(x,n:integer):longint;
var p:longint;
begin
p:=1;
while n>0 do begin
if n mod 2 =1 then begin
p:=p*x;
dec(n);
end;
x:=x*x;
n:=n div 2;
end;
PL:=p;
end;
begin
assign (f,'lgput.in');
reset(f);
assign(g,'lgput.out');
rewrite(g);
read(f,n);
read(f,p);
close(f);
write(g,PL(n,p)mod 1999999973);
close(g);
end.