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

c语言写的285b代码怎么写的,我最短的代码都要550+

Posted by kyogre at 2017-09-03 22:43:48
#include<stdio.h>
#include<string.h>
char m1[19][9]={"pop","no","zip","zotz","tzec","xul","yoxkin","mol","chen","yax","zac","ceh","mac","kankin","muan","pax","koyab","cumhu","uayet"};
char m2[20][9]={"imix","ik","akbal","kan","chicchan","cimi","manik","lamat","muluk","ok","chuen","eb","ben","ix","mem","cib","caban","eznab","canac","ahau"};
int main()
{
	int t,i,d,y,a;
	scanf("%d",&t);
	printf("%d\n",t);
	while(t--)
	{
		char m[9];
		scanf("%d.%s%d",&d,m,&y);
		for(i=0;i<19;i++)
			if(!strcmp(m1[i],m))
				break;
			a=y*365+i*20+d;
			printf("%d %s %d\n",1+a%13,m2[a%20],a/260);
	}
}
光是两个数组定义都有300了,285是什么鬼

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