本文共 1552 字,大约阅读时间需要 5 分钟。
1 #include 2 #include 3 using namespace std; 4 int main(){ 5 map HaabMonth; 6 HaabMonth["pop"]=0; 7 HaabMonth["no"]=1; 8 HaabMonth["zip"]=2; 9 HaabMonth["zotz"]=3;10 HaabMonth["tzec"]=4;11 HaabMonth["xul"]=5;12 HaabMonth["yoxkin"]=6;13 HaabMonth["mol"]=7;14 HaabMonth["chen"]=8;15 HaabMonth["yax"]=9;16 HaabMonth["zac"]=10;17 HaabMonth["ceh"]=11;18 HaabMonth["mac"]=12;19 HaabMonth["kankin"]=13;20 HaabMonth["muan"]=14;21 HaabMonth["pax"]=15;22 HaabMonth["koyab"]=16;23 HaabMonth["cumhu"]=17;24 HaabMonth["uayet"]=18;25 26 string TzolkinDay[]={ "", "imix", "ik", "akbal", "kan", "chicchan", "cimi", "manik", "lamat", "muluk", "ok", 27 "chuen", "eb", "ben", "ix", "mem", "cib", "caban", "eznab", "canac", "ahau"};28 29 int n;30 int Hday;31 string Hmonth;32 int Hyear;33 int Tperiod;34 int Tday;35 int Tyear;36 int day;37 char doc;38 39 cin>>n;40 cout< < >Hday>>doc>>Hmonth>>Hyear;44 day=Hyear*365+HaabMonth[Hmonth]*20+Hday+1;45 Tyear=day/260;46 if(day%260==0){47 Tyear--;48 }49 Tperiod=day%13;50 if(Tperiod==0){51 Tperiod=13;52 }53 Tday=day%20;54 if(Tday==0){55 Tday=20;56 }57 cout< <<' '< <<' '< <
转载于:https://www.cnblogs.com/marlenemizuno/p/6373686.html