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 |
一直 WA 不知道 哪错了 望高手 求救 !!!#include <iostream> #include <string> using namespace std; string Tc_month[]={"imix", "ik", "akbal", "kan", "chicchan", "cimi", "manik", "lamat", "muluk", "ok", "chuen", "eb", "ben", "ix", "mem", "cib", "caban", "eznab", "canac", "ahau" }; string Mc_month[]={"pop", "no", "zip", "zotz", "tzec", "xul", "yoxkin", "mol", "chen", "yax", "zac", "ceh", "mac", "kankin", "muan", "pax", "koyab", "cumhu", "uayet"}; int main() { int t; cin>>t; while(t--) { int i; double day; int year; int M_month; int totallday; string s; cin>>day>>s>>year; for(i=0;i<=18;i++) { if(Mc_month[i]==s) M_month=i; } totallday = ( M_month * 20 + (int)(day) + 365 * year ); cout<< totallday % 13 + 1<< " "<<Tc_month[totallday % 20]<<" "<<totallday / 260<<endl; } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator