| ||||||||||
| 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 | |||||||||
这里的各种特殊数据都通过了啊,为什么还是WA,好郁闷啊,不知道哪里错了,求大神指点#include <stdio.h>
#include <string.h>
int N,d,y,total;
char m[100];
char haab[19][10]={"pop","no","zip","zotz","zec","xul","yoxkin","mol","chen","yax","zac","ceh","mac","kankin","muan","pax","koyab","cumhu","uayet"};
char tzolkin[20][10]={"imix","ik","akbal","kan","chicchan","cimi","manik","lamat","muluk","ok","chuen","eb","ben","ix","mem","cib","caban","eznab","canac","ahau"};
int main()
{
int i;
scanf("%d",&N);
printf("%d\n",N);
while(N--){
scanf("%d.%s%d",&d,m,&y);
total = 0;
for(i=0; i<19; i++){
if(strcmp(haab[i],m)==0){
total = d + i*20 + y*365;
break;
}
}
printf("%d %s %d\n",total%13+1,tzolkin[total%20],total/260);
}
return 0;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator