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> #include <string> using namespace std; void main() { string Haab[19]={"pop","no","zip","zotz","tzec","xul","yoxkin","mol","chen", "yax","zac","ceh","mac","kankin","muan","pax","koyab","cumhu","uayet"}; string Tzolkin[20]={"ahau","imix","ik","akbal","kan","chicchan","cimi","manik","lamat", "muluk","ok","chuen","eb","ben","ix","mem","cib","caban","eznab","canac"}; float dayh; string monthh; int yearh; int mh=0; int tl=0; int td=0; int tm=0; long days=0; int loop=0; cin>>loop; for (int lp=1;lp<=loop;lp++) { cin>>dayh>>monthh>>yearh; for (int i=0;i<19;i++) { if (monthh==Haab[i]) { mh=i; break; } } days=365*yearh+20*mh+int(dayh)+1; tl=days%260; td=tl%13; tm=tl%20; if (td==0) td=13; if (lp==1) cout<<loop<<endl; cout<<td<<' '<<Tzolkin[tm]<<' '<<days/260<<endl; } } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator