标签:
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 8819 Accepted Submission(s):
4595
#include<iostream> using namespace std; int main() { __int64 n,j; __int64 f[37][37],i; for(i=1;i<36;i++) f[0][i]=1; for(i=1;i<35;i++) { for(j=i;j<=35;j++) { if(i==j) f[i][j]=f[i-1][j]; else f[i][j]=f[i-1][j]+f[i][j-1]; } } int k=0; while(cin>>n,n+1) cout<<++k<<‘ ‘<<n<<‘ ‘<<2*f[n-1][n]<<endl; return 0; }
标签:
原文地址:http://www.cnblogs.com/Ritchie/p/5425374.html