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 |
这SB的系统,我如果错了我吃马桶!!!!!(代码如下)import java.util.*; class Main{ static String[] haab = {"pop", "no", "zip", "zotz", "tzec", "xul", "yoxkin", "mol", "chen", "yax", "zac", "ceh", "mac", "kankin", "muan", "pax", "koyab", "cumhu","uayet"}; static String[] tzolkin = {"imix", "ik", "akbal", "kan", "chicchan", "cimi", "manik", "lamat", "muluk", "ok", "chuen", "eb", "ben", "ix", "mem", "cib", "caban", "eznab", "canac", "ahau"}; public static void main(String[] args){ Scanner cin = new Scanner(System.in); int times = cin.nextInt(); for(int i=0; i<times; i++){ String sday,smonth,syear; int day=0; sday = cin.next(); int c = sday.indexOf("."); sday = sday.substring(0,c); day = Integer.parseInt(sday); smonth = cin.next(); syear = cin.next(); int sy = Integer.parseInt(syear); int sum = day + renum(smonth)*20 + sy*365; System.out.println((1+sum%13) + " " + tzolkin[sum%20] + " " + sum/260); } } public static int renum(String s){ int j; for( j=0; j<20; j++) if(s.equals(haab[j])) break; return j; } } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator