Pagini recente » Cod sursa (job #99862) | Cod sursa (job #1714898) | Cod sursa (job #2746910) | Cod sursa (job #340297) | Cod sursa (job #186703)
Cod sursa(job #186703)
var a,b:int64;
function put(a,b:int64):int64;
var r:qword;
begin
if b=0 then put:=1
else
if b and 1=1 then put:=(a*put(a,b-1)) mod 1999999973
else
begin
r:=put(a,b shr 1);
put:=(r*r) mod 1999999973;
end;
end;
begin
assign(input,'lgput.in'); reset(input); assign(output,'lgput.out'); rewrite(output);
readln(a,b);
writeln(put(a,b));
close(input); close(output);
end.