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 |
请高手指点,什么叫做 Runtime Error 这是我的代码#include<iostream> using namespace std; int main() { int num[10], a[10][64],max[10] = {0},total[10] = {0},j = 0; while (1) { cin >> num[j]; if (num[j] == 0) break; for (int i = 0; i < num[j]; i ++) { cin >> a[j][i]; total[j] += a[j][i]; if (a[j][i] > max[j]) max[j] = a[j][i]; } j ++; } for (int k = 0; k < j; k ++) for (int l = max[k]; l <= total[k]; l ++) if (total[k] % l == 0) { cout << l << endl; break; } return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator