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

Re:我自己运行可以,怎么提交就是runtime errer

Posted by jiangpeng at 2007-10-23 18:52:58 on Problem 1775
In Reply To:我自己运行可以,怎么提交就是runtime errer Posted by:johnlin55 at 2006-08-14 13:28:16
> #include<iostream>
> using namespace std;
> void main()
> {
> 	long int a[10]={362880,40320,5040,720,120,24,6,2,1,1};
> 	int in,i,out[1000],n=0;
> 	cin>>in;
> 	while(in>=0)
> 	{
> 		if(in==0)out[n]=0;
> 		else 
> 		{
> 			for(i=0;i<10;i++)
> 				if(in>=a[i])in=in-a[i];
> 			if(in==0)out[n]=1;
> 			else out[n]=0;
> 		}
> 		n++;				
> 		cin>>in;
> 	}
> 	for(i=0;i<n;i++)
> 		if(out[i])cout<<"YES\n";
> 		else cout<<"NO\n";
> }

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