Pagini recente » Cod sursa (job #1118636) | Cod sursa (job #2544697) | Cod sursa (job #1737081) | Cod sursa (job #670993) | Cod sursa (job #586967)
Cod sursa(job #586967)
var t,i,j,k,l:longint;
n:int64;
a,b:array[1..100000000] of longint;
f,g:text;
begin
assign(f,'ssnd.in');
assign(g,'ssnd.out');
reset(f);
rewrite(g);
readln(f,t);
n:=100000;
for i:=1 to round(sqrt(n)) do
begin
j:=i;
while j<=n do
begin
inc(a[j]);
b[j]:=b[j]+i;
if b[j]>2000000000 then b[j]:=b[j] mod 9973;
inc(j,i);
end;
end;
for l:=1 to t do
begin
readln(f,n);
writeln(g,a[n],' ',(b[n]) mod 9973);
end;
close(g);
end.