http://acm.hdu.edu.cn/showproblem.php?pid=1178
等差求和公式s=n(n+1)/2=n/2+n^2/2。。。
sum=1+3+6+………………+i(i+1)(i+2)/6
=1+(1+2)+(1+2+3)+…………(1+2+3+……n)
=1/2+1^2/2+2/2+2^2/2+…………n/2+n^2/2
=n(n+1)/2/2+n(n+1)(n+2)/6/2
=n(n+1)(n+2)/6.
posted on 2012-09-12 21:19 仁者无敌8勇者无惧 阅读(99) 评论(0) 编辑 收藏 举报
Powered by: 博客园 Copyright © 2024 仁者无敌8勇者无惧 Powered by .NET 9.0 on Kubernetes