Pagini recente » Cod sursa (job #637743) | Cod sursa (job #1133690) | Cod sursa (job #255512) | Cod sursa (job #181025) | Cod sursa (job #1501837)
var f:text;
a,b:longint;
c:int64;
function putere(x,n:longint):int64;
var p:int64;
begin
if n=0 then putere:=1
else
if n mod 2=0 then
begin
p:=putere(x,n div 2);
putere:=p*p
end
else
begin
p:=putere(x,(n-1)div 2);
putere:=p*p*x
end;
end;
begin
assign(f,'lgput.in');
reset(f);
readln(f,a,b);
close(f);
c:=putere(a,b);
assign(f,lgput.out');
rewrite(f);
writeln(f,c);
close(f);
end.