| ||||||||||
| 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 | |||||||||
看faqIn Reply To:runtime error 是什么意思 啊 Posted by:niuniu2006 at 2007-03-30 20:44:32 > #include <iostream>
> using namespace std;
> int main()
> {
> int n;
> int arr[50];
> int re[50]={0};
> cin>>n;
> for (int i=0;i<=n-1;++i)
> cin>>arr[i];
> for (int j=0;j<=n-1;++j)
> {
> for (int jj=0;jj<=arr[j]-1;++jj)
> {
> re[j]+=(jj+1)*(jj+2)*(jj+3)/2;
> }
> cout<<j+1<<" "<<arr[j]<<" "<<re[j]<<endl;
> }
>
> return 0;
> }
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator