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 |
终于AC啦!发个贴庆祝一下#include<stdio.h> #include<string.h> char H[20][10]={"pop","no","zip","zotz","tzec","xul","yoxkin","mol","chen", "yax","zac","ceh","mac","kankin","muan","pax","koyab","cumhu","uayet"}; char T[22][10]={"ahau","imix","ik","akbal","kan","chicchan","cimi","manik","lamat", "muluk","ok","chuen","eb","ben","ix","mem","cib","caban","eznab","canac"}; char strh[50]; int main() { //freopen("in.txt","r",stdin); int day,year,n,i; char month[20]; scanf("%d",&n); getchar(); printf("%d\n",n); while(n--) { gets(strh); sscanf(strh,"%d. %s %d",&day,month,&year); for(i=0;i<18;i++) if(strcmp(month,H[i])==0) break; day+=i*20+year*365; printf("%d %s %d\n",day%13+1,T[(day+1)%20],day/260); } //while(1); return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator