| ||||||||||
| 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 | |||||||||
Re:哪位前辈能帮忙看一下,我都快崩溃了……ft,为什么会WrongAnswerIn Reply To:哪位前辈能帮忙看一下,我都快崩溃了……ft,为什么会WrongAnswer Posted by:test1989 at 2004-02-21 03:14:16 > #include<iostream.h>
> #include<string.h>
> #include<stdio.h>
> void main()
> {
> char Haab[19][10]={"pop","no","zip","zotz","tzec","xul",
> "yoxkin","mol","chen","yax","zac","ceh","mac","kankin",
> "muan","pax","koyab","cumhu","uayet"};
> char Tzolkin[20][10]={"imix","ik","akbal","kan","chicchan",
> "cimi","manik","lamat", "muluk","ok","chuen","eb",
> "ben","ix","mem","cib","caban","eznab","canac","ahau"};
> char s[10];
> int n,i,j,a,b,c,day,a1,b1,c1;
> cin>>n;
> cout<<n<<endl;
> for(j=0;j<n;j++)
> {
> scanf("%d. %s %d",&a,s,&c);
> for(i=0;i<19;i++)if(!strcmp(s,Haab[i])){b=i;break;}
> day=c*365+b*20+a+1;
> c1=day%260==0?(day/260-1):day/260;
> b1=(day%260)%20;
> a1=(day%260)%13;
> if(a1==0)a1=13;
> if(b1==0)b1=20;
> cout<<a1<<" "<<Tzolkin[b1-1]<<" "<<c1<<endl;
> }
> }
>
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator