Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
Register

## Re:那组特殊数据也过了，输出格式反复对比野队了·，大佬们帮帮看看哪里有问题，一直WA

Posted by runneryang86 at 2018-10-01 11:36:06 on Problem 1008
In Reply To:那组特殊数据也过了，输出格式反复对比野队了·，大佬们帮帮看看哪里有问题，一直WA Posted by:xiaoguazi0008 at 2018-02-24 18:42:05
```#include<stdio.h>
#include<string.h>
int main()
{
long day,tatoldays;
int N,i,j,year,month;
char Haabmonth[19][10]={"pop", "no", "zip", "zotz", "tzec", "xul", "yoxkin", "mol", "chen", "yax", "zac", "ceh", "mac", "kankin", "muan", "pax", "koyab", "cumhu", "uayet"};
char Tzolkinday[20][10]={"imix", "ik", "akbal", "kan", "chicchan", "cimi", "manik", "lamat", "muluk", "ok", "chuen", "eb", "ben", "ix", "mem", "cib", "caban", "eznab", "canac", "ahau"};
char temp[15];
scanf("%d",&N);
printf("%d\n",N);
while (scanf("%d. %s %d",&day,temp,&year) == 3)
{
tatoldays=0;
for(j=0;j<19;j++)
{
if(strcmp(Haabmonth[j],temp)==0) break;
}
tatoldays=year*365+20*j+day;
month=1+tatoldays%13;
day=tatoldays%20;
year=tatoldays/260;
printf("%d %s %d\n",month,Tzolkinday[day],year);

}
return 0;
}

Followed by: