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 error?谢了#include<stdio.h> #include<string.h> char* haab[19]={"pop","no","zip","zotz","tzec","xul","yoxkin","mol","chen","yax","zac","ceh","mac","kankin","muan","pax","koyab","cumhu","uayet"}; char* tzolkin[20]={"imix","ik","akbal","kan","chicchan","cimi","manik","lamat","muluk","ok","chuen","eb","ben","ix","mem","cib","caban","eznab","canac","ahau"}; int main() { int set; scanf("%d",&set); printf("%d\n",set); for(int i=0;i<set;i++) { int hday,hyear,day; char* hmonth; scanf("%d. %s %d",&hday,hmonth,&hyear); int j=0; for(;j<19;j++) if(strcmp(hmonth,haab[j])==0) break; day=hyear*365+j*20+hday; int tday,tperiod,tyear; tyear=day/260; tperiod=day%13+1; tday=day%20; printf("%d %s %d\n",tperiod,tzolkin[tday],tyear); } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator