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 |
请教------与samp out 答案完全相同,为何还是wrong answer??????#include<stdio.h> #include<string.h> void main() { int a,c,b[7],n,i,j,a1,c1,k;long int m; char p[19][7]={"pop","no","zip","zotz","tzec","xul","yoxkin","mol","chen","yax","zac","ceh","mac","kankin","muan","pax","koyab","cumhu","uayet"}; char q[20][9]={"imix","ik","akbal","kan","chicchan","cimi","manik","lamat","muluk","ok","chuen","eb","ben","ix","mem","cib","caban","eznab","canac","ahau"}; scanf("%d\n",&n); printf("%d\n",n); for(i=1;i<=n;i++) { scanf("%d.%s%d",&a,b,&c);if(c>5000)printf("your answer are wrong\n"); for(j=0;j<19;j++) if(strcmp(b,p[j])==0)break; m=365*c+20*j+a+1; c1=m/260; a1=(m%260)%13; k=(m%260)%20-1; printf("%d %s %d\n",a1,q[k],c1); } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator