Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

请高手指点,什么叫做 Runtime Error 这是我的代码

Posted by fantasyorg at 2007-06-10 13:30:36 on Problem 1011
#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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator