program j01; var n,i:longint; ans:int64; begin readln(n); ans:=0; for i:=1 to n do ans:=ans+(n div i); writeln(ans); end.
bzoj1968: [Ahoi2005]COMMON 约数研究
原文:http://www.cnblogs.com/oldjang/p/6188690.html