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:那位大牛帮帮忙,告诉我为什么G++可以AC,而C++就 Runtime Error,怪异呀............

Posted by wzh5024wzh at 2008-05-26 14:19:38 on Problem 1426
In Reply To:那位大牛帮帮忙,告诉我为什么G++可以AC,而C++就 Runtime Error,怪异呀............ Posted by:bjss at 2007-10-26 17:36:57
> //2835169 bjss 1426 Accepted 3552K 31MS G++ 227B 2007-10-26 17:27:09 
> //2835180 bjss 1426 Runtime Error   C++ 226B 2007-10-26 17:30:18 
> /*不知道为什么G++可以AC,而C++就 Runtime Error*/
> 
> #include<iostream.h>
> int a[524300],i,n;
> int main(){
> 	while(cin>>n){
> 		i=1; a[1]=1%n;
> 		while(a[i]){i++; a[i]=(a[i/2]*10+i%2)%n;}
> 		n=0; while(i){a[n++]=i%2;i>>=1;}
> 		while(n--) cout<<a[n]; cout<<endl;
> 	}
> 	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