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 |
为什么不能通过呢??纠结!谁能帮帮忙??#include<iostream> #include<string> using namespace std; string Hmon[19]={"pop", "no"," zip"," zotz"," tzec", "xul", "yoxkin", "mol", "chen", "yax", "zac", "ceh", "mac", "kankin", "muan", "pax", "koyab", "cumhu","uayet"}; string Tmon[20]={"ahau","imix", "ik", "akbal", "kan", "chicchan", "cimi", "manik", "lamat", "muluk", "ok", "chuen", "eb", "ben", "ix", "mem", "cib", "caban", "eznab", "canac" }; int day[13]={13,1,2,3,4,5,6,7,8,9,10,11,12}; int main() { int i,j,k,b,c,n,t,a;string s;char x; cin>>n;cout<<n<<"\n"; for(i=0;i<n;i++) {cin>>a>>x>>s>>b; for(j=0;j<18;j++) if(s==Hmon[j]) break; if(j==19)c=b*365+a+360+1; else c=b*365+a+j*20+1; t=c/260; k=c%260;if(k==0){t--;k=260;} cout<<day[k%13]<<" "<<Tmon[k%20]<<" "<<t<<"\n"; } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator