| ||||||||||
| 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,都检查5小时了我用TC测各种数据结果都对,就是不能AC哪位火眼金睛,指点迷津一下啊
#include "stdio.h"
#include "string.h"
main()
{ int more,h;
int i,j,n,m,c,ss,qq=0,q[50],w[50];
char ch[7],e[50][9];
char a[19][7]={"pop","no","zip","zotz","tzec","xul","yoxkin","mol","chen","yax","zac","ceh","mac","kankin","muan","pax","koyab","cumhu","uayet"};
char b[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);
for(i=1;i<=n;i++)
{ scanf("%d. %s %d",&c,ch,&h);
c++;
for(j=0;j<19;j++)
if(strcmp(ch,a[j])==0){m=j;break;}
more=h*105/260;
ss=c+m*20+h*105-more*260;
while(ss>260)
{ss=ss-260;more++;}
q[qq]=ss%13;
w[qq]=h+more;
strcpy(e[qq++],b[ss%20-1]);}
printf("%d\n",n);
for(i=0;i<n;i++) printf("%d %s %d\n",q[i],e[i],w[i]);
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator