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 |
请hawk看看,我的程序老WAconst name:array[1..19] of string=('pop','no','zip','zotz','tzec','xul','yoxkin','mol', 'chen','yax','zac','ceh','mac','kankin','muan','pax','koyab','cumhu','uayet'); holly:array[1..20] of string=('imix','ik','akbal','kan','chicchan','cimi','manik', 'lamat','muluk','ok','chuen','eb','ben','ix','mem','cib','caban','eznab','canac','ahau'); var y1,d1,y2,d2,i,j,k,c,t,ti,p:integer; sum,z:longint; s,m1,m2,w:string; begin readln(t); writeln(t); for ti:=1 to t do begin readln(s); p:=pos(' ',s); val(copy(s,1,p-2),d1,c); s:=copy(s,p+1,length(s)-p); p:=pos(' ',s); m1:=copy(s,1,p-1); s:=copy(s,p+1,length(s)-p); p:=pos(' ',s); if p<>0 then s:=copy(s,1,p-1); val(s,y1,c); z:=y1; sum:=365*z; for i:=1 to 19 do if name[i]=m1 then break; inc(sum,20*(i-1)); inc(sum,d1+1); y2:=sum div 260; sum:=sum mod 260; d2:=sum mod 13; k:=sum mod 20; if d2=0 then d2:=13; if k=0 then k:=20; m2:=holly[k]; writeln(d2,' ',m2,' ',y2); end; end. Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator