Pagini recente » Cod sursa (job #74191) | Cod sursa (job #1619053) | Cod sursa (job #1415489) | Cod sursa (job #301450) | Cod sursa (job #301453)
Cod sursa(job #301453)
var i,n,m:longint;
p,s:int64;
f,g:text;
procedure load;
begin
assign(f,'sumdiv.in');
reset(f);
readln(f,n,m);
closE(f);
assign(g,'sumdiv.out');
rewrite(g);
end;
BEGIN
load;
p:=1;s:=0;
for i:=1 to m+1 do
begin
s:=s+p;
p:=p*n;
end;
if m=0 then s:=1;
if n=0 then s:=0;
if (m=0) and (n=0) then s:=1;
writeln(g,s mod 9901);
close(g);
END.