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

ends在Judge上输出的不是标准空格,挖哈哈

Posted by bluewind at 2006-08-16 20:04:56 on Problem 1008
In Reply To:真的是改个输出就ac了,不信你拿我的程序去ac看看(cout改成printf就ac了)!请大牛看看这是为什么? Posted by:feifeicq at 2006-08-16 17:35:51
> #include <iostream>
> #include <stdlib.h>
> using namespace std;
> char year[19][10] = { "pop", "no", "zip", "zotz", "tzec",
>  "xul", "yoxkin", "mol", "chen", "yax", "zac", "ceh", 
>  "mac", "kankin", "muan", "pax", "koyab", "cumhu","uayet"};
> char month[20][10] = { "imix", "ik",  "akbal", "kan", "chicchan", "cimi", "manik", "lamat", 
> "muluk", "ok", "chuen", "eb", "ben", "ix", "mem", "cib", "caban", "eznab", "canac", "ahau"};
> 
> int renum(char *ch)
> {
> 	int i; 
> 	for( i=0; i<20; i++)
> 		if(strcmp(ch,year[i]) == 0)
> 			break;
> 	return i;
> }
>  int main()
> {
> 	 int n,num1,num2;
> 	 long sum;
> 	 char ch[10];
> 	 cin>>n;
> 	 cout<<n<<endl;
> 	 for(int i=0; i<n; i++)
> 	 {	
> 		 cin>>num1;
> 		 getchar();
> 		 getchar();
> 		 cin>>ch>>num2;
> 		 sum = num1 + renum(ch) * 20 + num2 * 365;
> 		 printf("%d %s %d\n",1+sum%13,month[sum%20],sum/260);//两个输出不同
> 		 //cout<<(1+sum%13)<<ends<<month[sum%20]<<ends<<(sum/260)<<endl;//
> 	 }
> 	return 1;
> }

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