Cod sursa(job #112623)
Utilizator | Data | 6 decembrie 2007 10:36:35 | |
---|---|---|---|
Problema | Suma divizorilor | Scor | 10 |
Compilator | fpc | Status | done |
Runda | Arhiva de probleme | Marime | 0.32 kb |
var a,b,i,v,s,nr,r:longint;
f,g:text;
begin
assign(f,'sumdiv.in');reset(f);
assign(g,'sumdiv.out');rewrite(g);
read(f,a);
read(f,b);
nr:=0;
s:=0;
v:=1;
repeat
v:=v*a;
nr:=nr+1;
until nr=b;
for i:=1 to v do
if v mod i=0 then s:=s+i;
r:=s mod 9901;
write(g,r);
close(f);
close(g);
end.