| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
求 1到n所有数跟n的最大公约数 之和有没有公式或者快一点的方法(log(n))?最简单的方法,帮助理解我的表达... int res = 0; for(int i = 1; i <= n; ++i) res += gcd(i, n); Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator