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

## 求大神看看，测试用例和自己写的边界测试都没有问题，但是错了

Posted by tanlan at 2017-09-13 14:52:10 on Problem 1008
```#include <iostream>
#include <string>
using namespace std;

const char *Haab[19]    = { "pop", "no", "zip", "zotz", "tzec", "xul", "yoxkin", "mol", "chen", "yax", "zac", "ceh", "mac", "kankin", "muan", "pax", "koyab", "cumhu", "uayet" };
const char *Tzolkin[20] = { "imix", "ik", "akbal", "kan", "chicchan", "cimi", "manik", "lamat", "muluk", "ok", "chuen", "eb", "ben", "ix", "mem", "cib", "caban", "eznab", "canac", "ahau" };
int main()
{
int num;
cin >> num;
for (int curDate = 0; curDate < num; curDate++)
{
float dayinput;
string mouthinput;
int year;
cin >> dayinput >> mouthinput >> year;
int day = dayinput;
int countDay = year * 365 + day;
for (int i = 0; i < 18; i++)
{
if (mouthinput == Haab[i])
{
break;
}
else{
countDay += 20;
}
}
int yearTzolkin = countDay / 260;
int mouthTzolkin = countDay % 260 % 20;
int DayTzolkin = 1 + countDay % 260 % 13;
cout << DayTzolkin << ' ' << Tzolkin[mouthTzolkin] << ' ' << yearTzolkin << endl;
}
return 0;
}```

Followed by: