PersonalCorpus 版 (精华区)
寄信人: sino (蚱蜢舟)
标 题: 1201
发信站: 哈工大紫丁香 (2002年03月18日18:54:51 星期一)
来 源: mtlab4.hit.edu.cn
167321 10:56:19 18 Mar 2002
Bozhang,HIT,P.R.China 1201 Pascal Accepted 0.03 sec 61K
const p:array[1..12] of byte=(31,28,31,30,31,30,31,31,30,31,30,31);
var
d,m,y,sum:integer;
i,j,k:integer;
s:array[1..7] of string;
begin
readln(d,m,y); sum:=6;
for i:=1600 to y-1 do begin
sum:=sum+365;
if ((i mod 4=0) and (i mod 100<>0)) or (i mod 400=0) then inc(sum);
end;
for i:=1 to m-1 do begin
sum:=sum+p[i];
if i=2 then
if ((y mod 4=0) and (y mod 100<>0)) or (y mod 400=0) then inc(su
m);
end;
sum:=sum mod 7; if sum=0 then sum:=7;
s[1]:='mon ';
s[2]:='tue ';
s[3]:='wed ';
s[4]:='thu ';
s[5]:='fri ';
s[6]:='sat ';
s[7]:='sun ';
i:=6; k:=p[m];
if m=2 then if ((y mod 4=0) and (y mod 100<>0)) or (y mod 400=0) then in
c(k);
for j:=1 to k do begin
if j<10 then begin
if j=d then begin
s[sum,i-1]:='[';
s[sum,i+2]:=']';
end;
s[sum,i+1]:=chr(j+48);
end else begin
if j=d then begin
s[sum,i-1]:='[';
s[sum,i+2]:=']';
end;
s[sum,i]:=chr(j div 10+48);
s[sum,i+1]:=chr(j mod 10+48);
end;
inc(sum); if sum=8 then begin i:=i+5; sum:=1 end;
end;
writeln(s[1]);
writeln(s[2]);
writeln(s[3]);
writeln(s[4]);
writeln(s[5]);
writeln(s[6]);
writeln(s[7]);
end.
--
千 但 此 月 人 别 何 不 照 低 转 何 起 高 又 我 今 不 把 明
里 愿 事 有 有 时 事 应 无 绮 朱 似 舞 处 恐 欲 夕 知 酒 月
共 人 古 阴 悲 圆 长 有 眠 户 阁 在 弄 不 琼 乘 是 天 问 几
婵 长 难 晴 欢 向 恨 人 清 胜 楼 风 何 上 青 时
娟 久 全 圆 离 间 影 寒 玉 归 年 宫 天 有
缺 合 宇 去 阙
※ 来源:·哈工大紫丁香 bbs.hit.edu.cn·[FROM: mtlab4.hit.edu.cn]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:2.097毫秒