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 |
更加数学的解法。。In Reply To:纯数学解法... Posted by:jmf at 2010-01-24 18:52:14 /******************* *poj.org Prob. 3086* *Author: Congbo SUN* *******************/ #include<cstdio> using namespace std; int main() { int t,i,n; long long ans; scanf("%d",&t); for(i=1; i<=t; i++) { scanf("%d",&n); ans = ((long long)n*(n+1)*(n+2)*(n+3))/8; printf("%d %d %d\n",i,n,ans); } return 0; } 整数裂项证明公式 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator