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

请教------与samp out 答案完全相同,为何还是wrong answer??????

Posted by lyl625760 at 2007-12-12 20:23:39 on Problem 1008
#include<stdio.h>
#include<string.h>
void main()
{
	int a,c,b[7],n,i,j,a1,c1,k;long int m;
		char p[19][7]={"pop","no","zip","zotz","tzec","xul","yoxkin","mol","chen","yax","zac","ceh","mac","kankin","muan","pax","koyab","cumhu","uayet"};
	char q[20][9]={"imix","ik","akbal","kan","chicchan","cimi","manik","lamat","muluk","ok","chuen","eb","ben","ix","mem","cib","caban","eznab","canac","ahau"};
		scanf("%d\n",&n);	printf("%d\n",n);
		for(i=1;i<=n;i++)

		{	scanf("%d.%s%d",&a,b,&c);if(c>5000)printf("your  answer  are   wrong\n");
			for(j=0;j<19;j++)
		if(strcmp(b,p[j])==0)break;
		m=365*c+20*j+a+1;
		c1=m/260;
		
		a1=(m%260)%13;
		k=(m%260)%20-1;
		printf("%d %s  %d\n",a1,q[k],c1);
	
}

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