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 |
一开始定义day[20][6]了,居然直接提交了、#include<stdio.h> #include<string.h> int main() { int i,j,m,n,a,x; char mon[19][7]={"pop","no","zip","zotz","tzec","xul","yoxkin","mol","chen","yax","zac","ceh","mac","kankin","muan","pax","koyab","cumhu","uayet"}; char day[20][9]={"imix","ik","akbal","kan","chicchan","cimi","manik","lamat","muluk","ok","chuen","eb","ben","ix","mem","cib","caban","eznab","canac","ahau"}; char ch[7]; scanf("%d",&j); printf("%d\n",j); for(i=0;i<j;i++) { scanf("%d.%s %d",&n,ch,&m); for(a=0;strcmp(mon[a],ch);a++); x=20*a+n+m*365; printf("%d %s %d\n",(x%13)+1,day[x%20],x/260); } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator