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 |
为什么老是runtime eorr# include <iostream> # include <string> using namespace std; int main(){ int n,sum,i; int d,y,td,tm,ty; string m; char *haab[20]={"pop","no","zip","zotz","tzec","xul","yoxkin","mol","chen" ,"yax","zac","ceh","mac","kankin","muan","pax","koyab","cumhu","uayet"}; char *zolkin[20]={"imix","ik","akbal","kan","chicchan","cimi","manik","lamat" ,"muluk","ok","chuen","eb","ben","ix","mem","cib","caban","eznab","canac","ahau"}; cin>>n; cout<<n<<endl;; while(n--) { cin>>d; cin.ignore(); cin>>m>>y; for( i=0;i<19;i++){ if(strcmp(m.c_str(),haab[i])==0) { sum=0; sum=y*365+i*20+d+1; ty=sum/260; tm=sum%20; td=sum%13; cout<<td<<" "<<zolkin[tm-1]<<" "<<ty<<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