| ||||||||||
| 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 | |||||||||
qing wen you shen me wen ti ma ? zen me lao shi runtime error#include<iostream>
using namespace std;
int main()
{ int num[63];
while(1)
{ int v=0, i=0, j=0, t=0;
scanf("%d",&v);
for(i=1;i<=v;i++){
scanf("%d",&num[i]);
t=num[i]+t;
if(num[i]>j)
j=num[i];
if(num[i]==0)
break;
}
for(i=j;i<=t;i++){
if(t%i==0)
break;
}
printf("%d\n",i);
}
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator