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

居然是wrong,难道是输出格式错了,我对了好久,感觉没错阿。好心人看一下。

Posted by ggg at 2006-02-09 19:26:38 on Problem 2710
#include <iostream>
using namespace std;
long num;
void main()
{
long m,n,start,end,temp;
cin>>num;
long result;
 for(int i=0;i<num;i++)
 {
	 cin>>m>>n>>start>>end;
	 cout<<"Problem set "<<i+1<<": "<<m<<" / "<<n<<", base7 digits "
		 <<start<<" through "<<end<<": ";
	 for(int j=0;j<=end;j++)
	 {
		 temp=7*m%n;
		 result=(7*m/n);
		 m=temp;
		 if(j>=start)
		 {
			 cout<<result;
		 }
	 }

	 cout<<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