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 |
测试数据也过了 但是总是不能通过#include <iostream.h> #include <string.h> #include <stdio.h> int main() { char month1[19][9]={"pop", "no","zip","zotz","tzec","xul","yoxkin","mol","chen","yax","zac", "ceh","mac","kankin","muan","pax","koyab","cumhu","uayet" }; char month2[20][10] ={ "ahau ","imix ", "ik ", "akbal ", "kan ", "chicchan ", "cimi ", "manik ", "lamat ", "muluk ", "ok ", "chuen ","eb ", "ben ", "ix ", "mem ", "cib ", "caban ", "eznab ", "canac "}; int year1,day1,year2,day2,count,day; char t,word[10]; cin>>count; cout<<count<<endl; while(count--) { cin>>day1; cin>>t; cin>>word; int i=0; for (i=0;strcmp(word,month1[i]);i++); int m=i; cin>>year1; if (m==19) day=360+day1; else day=m*20+day1; day+=year1%260*365; day++; year2=year1/260*365+day/260; int mon=day%20; day2=day%13; if (day2==0) day2=13; cout<<day2<<" "<<month2[mon]<<year2<<endl; } return 0; } 帮我看一下,高手们,QQ89434081 万分感谢! 还有JudgeOnlineSetup怎么用啊!麻烦解释一下! Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator