Pagini recente » Cod sursa (job #2391598) | Cod sursa (job #1427093) | Cod sursa (job #1332297) | Cod sursa (job #3282767) | Cod sursa (job #1011418)
Program logaRITM;
function putere(var a,b:longint):longint;
var p:longint;
begin
p:=1;
while b>0 do
begin
if b mod 2 = 1 then
begin
p:=(p*a)mod 1999999973;
dec(b);
end;
a:=(a*a)mod 1999999973;
b:=b div 2;
end;
putere:=p;
end;
var a,b:longint;
input,out:text;
begin
assign(input,'lgput.in');
assign(out,'lgput.out');
rewrite(out);
readln(input,a,b);
writeln(out,putere(a,b));
close(input);
close(out);
end.