| ||||||||||
| 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:怎么老是wrong阿In Reply To:怎么老是wrong阿 Posted by:first at 2003-11-02 22:34:43 > #include <iostream>
> #include <string>
> using namespace std;
> const string Haab[19]={"pop", "no", "zip", "zotz", "tzec","xul",
> "yoxkin", "mol", "chen", "yax", "zac", "ceh"
> , "mac", "kankin", "muan", "pax", "koyab", "cumhu","uayet"};
> const string Tzolkin[20]={"ahau","imix","ik","akbal","kan","chicchan","cimi",
> "manik","lamat","muluk","ok","chuen","eb","ben","ix","mem", "cib", "caban", "eznab", "canac"};
> int main()
> {
>
>
> int i,j,N,year;
> float day;
> string month;
> long d,totald;
> cin>>N;
> cout<<N<<endl;
> for(i=0;i<N;i++)
> {
> cin>>day>>month>>year;
> for(j=0;j<19;j++)
> if(Haab[j]==month)
> d=j*20+int(day+1.1);
> totald=d+year*365;
> cout<<((totald%13)!=0?(totald%13):13)<<" "<<Tzolkin[totald%20]<<" "<<totald/260<<endl;
> }
> }
>
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator