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 |
那位高手能帮我看看,为什么老是Wrong answer!谢谢!万分感谢!#include<iostream.h> #include<string.h> void main() { int count,year,day,j,y,num,name; long int All_day; char *m[19]={"pop","no","zip","zotz","tzec","xul","yoxkin","mol","chen","yax", "zac","ceh","mac","kankin","muan","pax","koyab","cumhu","uayet"}; char *n[20]={"imix","ik","akbal","kan","chicchan","cimi","manik","lamat","muluk","ok", "chuen","eb","ben","ix","mem","cib","caban","eznab","canac","ahau"}; char month[10]; cin>>count; cout<<count<<endl; for(int i=0;i<count;i++) { cin>>day; cin>>month; cin>>year; for(j=0;j<19;j++) { if(strcmp(month,m[j])==0) break; } All_day=year*365+j*20+day; y=(All_day+1)/260; num=All_day%13+1; name=All_day%20; cout<<num<<" "<<n[name]<<" "<<y<<endl; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator