| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
终于AC了,一个字母打错就完蛋~~~#include <stdio.h>
#include<string.h>
#include<stdlib.h>
int main()
{
int Ty;
int Hd,Hy;
char hm[7];
int n,i,d=0;
char Td[20][9]={"imix","ik","akbal","kan","chicchan",
"cimi","manik","lamat","muluk","ok","chuen","eb",
"ben","ix","mem","cib","caban","eznab","canac","ahau"};
char Hm[19][7]={"pop","no","zip","zotz","tzec","xul","yoxkin","mol","chen",
"yax","zac","ceh","mac","kankin","muan","pax","koyab","cumhu","uayet"};
scanf("%d",&n);
printf("%d\n",n);
while(n--)
{
scanf("%d",&Hd);
getchar();getchar();
scanf("%s%d",hm,&Hy);
for(i=0;i<19;i++)
{
if(strcmp(hm,Hm[i])==0)
{
d=(i*20+Hd+Hy*365);
break;
}
}
printf("%d %s %d\n",d%13+1,Td[d%20],d/260);
}
system("pause");
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator