1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> using namespace std;
int main() { char hm[19][10]={ "pop","no","zip","zotz","tzec","xul", "yoxkin","mol","chen","yax","zac", "ceh","mac","kankin","muan","pax", "koyab","cumhu","uayet" }; char tm[20][10]={ "imix","ik","akbal","kan","chicchan", "cimi","manik","lamat","muluk","ok", "chuen","eb","ben","ix","mem", "cib","caban","eznab","canac","ahau" }; int i,t,n,y,d; char m[10]; scanf("%d",&t;); printf("%dn",t); while(t--) { scanf("%d. %s %d",&d;,m,&y;); for(i=0;i<19;i++) if(strcmp(m,hm[i])==0) break; n=365*y+20*i+d; printf("%d %s %dn",n%260%13+1,tm[n%20],n/260); } }
|