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<stdio.h> #include<stdlib.h> #include<string.h> char *H[ 18 ] ={"pop","no","zip","zotz","tzec", "xul","yoxkin","mol","chen","yax", "zac","mac","kankin","muan","pax", "koyab","cumhu","uayet"}; char *T[ 20 ] ={ "ahau","imix","ik","akbal","kan","chicchan","cimi", "manik","lamat","muluk","ok","chuen","eb", "ben","ix","mem","cib","caban","eznab", "canac"}; int main( ){ int date = 0 ,year = 0; char mon[ 32 ]; int total = 0; int n = 0, i = 0; scanf( "%d", &n ); printf( "%d\n", n ); while( n-- ){ scanf( "%d.%s%d",&date,mon,&year ); for( i =0; i != 18; ++i) if(strcmp(mon, H[i]) == 0) break; total = date+i*20+year*365; printf( "%d %s %d\n",total%13+1,T[ (total+1)%20 ],total/260 ); } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator