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

哪位大哥看一下,为什么老compile error

Posted by 618907 at 2010-05-08 17:00:11 on Problem 2196
#include<iostream>
using namespace std;
int sum(int n,int i)

	{
	int m,s=0;
	while(n>0)
		{
		m=n%i;
		n=n/i;
		s+=m;
		}
	return s;
	}


void main()
	{
	int i,t;
	for(i=2992;i<10000;i++)
		{
		t=sum(i,10);
		if(t==sum(i,12)&&t==sum(i,16))
			cout<<i<<endl;
		}
	}


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