Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

一直 WA 不知道 哪错了 望高手 求救 !!!

Posted by daxingxing at 2010-07-23 13:49:00 on Problem 1008
#include <iostream>
#include <string>
using namespace std;
string Tc_month[]={"imix", "ik", "akbal", "kan", "chicchan", "cimi", "manik", "lamat", "muluk", "ok", "chuen", "eb", "ben", "ix", "mem", "cib", "caban", "eznab", "canac", "ahau" };
string Mc_month[]={"pop", "no", "zip", "zotz", "tzec", "xul", "yoxkin", "mol", "chen", "yax", "zac", "ceh", "mac", "kankin", "muan", "pax", "koyab", "cumhu", "uayet"};

int main()
{
    int t;
    cin>>t;
    while(t--)
    {
          int i;
          double day;
          int year;
          int M_month;
          int totallday;
          string s;
          cin>>day>>s>>year;
          for(i=0;i<=18;i++)
          {
             if(Mc_month[i]==s)
                M_month=i;
          }
          totallday = ( M_month * 20 + (int)(day) + 365 * year );
          cout<< totallday % 13 + 1<< " "<<Tc_month[totallday % 20]<<" "<<totallday / 260<<endl;
    }
    return 0;
}

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator