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 |
诚心的请求大家帮我看看,是在不知道为什么WA,数据测试都是对的啊#include <iostream> #include <string.h> using namespace std; char mnameHaab[19][10]={"pop","no", "zip", "zotz", "tzec", "xul", "yoxkin", "mol", "chen", "yax", "zac", "ceh", "mac", "kankin", "muan", "pax", "koyab", "cumhu","uayet"}; char mnameTzolkin[20][10]={ "imix", "ik", "akbal", "kan", "chicchan", "cimi", "manik", "lamat", "muluk", "ok", "chuen", "eb", "en", "ix", "mem", "cib", "caban", "eznab", "canac", "ahau"}; int main() { int n=0,y1=0,d1=0,m1=0,alld[1000]={0}; char sd1[10],sm1[20]; cin>>n; for(int i=0;i<n;i++) { cin>>sd1;cin>>sm1;cin>>y1; for(m1=0;m1<19;m1++) if(!strcmp(sm1,mnameHaab[m1])) break; d1=0; for(int j=0;sd1[j]!='.';j++) d1=d1*10+(sd1[j]-'0'); alld[i]=365*y1+20*m1+d1; //计算总天数 } cout<<n<<endl; for(int i=0;i<n;i++) { cout<<1+alld[i]%13<<" "<<mnameTzolkin[alld[i]%20]<<" "<<alld[i]/260<<endl; } return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator