usaco 1.1.3.Friday(黑色星期五)我是pascal看看:var i,n,day,month,year:longint;a:array[1..7]of longint;beginreadln(n);month:=1;year:=1900;for i:=1 to 7 doa[i]:=0;a[6]:=1;day:=6;for i:=2 to 12*n dobegininc(month);if month =13 then begin inc(ye

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/15 09:08:27
usaco 1.1.3.Friday(黑色星期五)我是pascal看看:var i,n,day,month,year:longint;a:array[1..7]of longint;beginreadln(n);month:=1;year:=1900;for i:=1 to 7 doa[i]:=0;a[6]:=1;day:=6;for i:=2 to 12*n dobegininc(month);if month =13 then begin inc(ye
xT͎0~߶f=Qq*7R! N+qX8 xI'i#Ux癙nf7[pLz?>}qx靷}a[{x?Xbm\WxǙֹYĔb <_"OqeOz1XF`Le=k9 QD#, TG#\EzX"%CT\q dǧ_\PD/lw%$#.Me"id_y#L5˴c#dBpGx2/]@J/-k1GKgz uA3bctlhA&E#ߧ^CLNA|<B[^jyga\SW\*Qp :, @XahlOF嗊eDD\nr Igo"] z/B`#C3Gֱ ;_7u6;%m tT}Rɴ Nrd"S$ˡ_Y"ki mL (q)7o܇]oԂ *ܪr}Y5olET5c{y2&bU'su9qIjz\_p+#Ϛ&m~n5 _

usaco 1.1.3.Friday(黑色星期五)我是pascal看看:var i,n,day,month,year:longint;a:array[1..7]of longint;beginreadln(n);month:=1;year:=1900;for i:=1 to 7 doa[i]:=0;a[6]:=1;day:=6;for i:=2 to 12*n dobegininc(month);if month =13 then begin inc(ye
usaco 1.1.3.Friday(黑色星期五)
我是pascal
看看:
var i,n,day,month,year:longint;
a:array[1..7]of longint;
begin
readln(n);
month:=1;year:=1900;
for i:=1 to 7 do
a[i]:=0;
a[6]:=1;day:=6;
for i:=2 to 12*n do
begin
inc(month);
if month =13 then begin inc(year);month:=1;end;
if month in[1,2,4,6,8,9,11] then day:=day+3;
{month in when=the time from when-1 to when}
if month in[5,7,10,12] then day:=day+2;
if month=3 then
if (year mod 400=0)or((year mod 4=0)and(year mod 1000)) then
day:=day+1
else day:=day;
if day>7 then day:=day mod 7;
inc(a[day]);
end;
writeln(a[6],' ',a[7],' ',a[1],' ',a[2],' ',a[3],' ',a[4],' ',a[5]);
end.

usaco 1.1.3.Friday(黑色星期五)我是pascal看看:var i,n,day,month,year:longint;a:array[1..7]of longint;beginreadln(n);month:=1;year:=1900;for i:=1 to 7 doa[i]:=0;a[6]:=1;day:=6;for i:=2 to 12*n dobegininc(month);if month =13 then begin inc(ye
program friday;
const
maxn=7;
var
top:integer;
i,n,m,j,k:longint;
a:array [1..maxn] of longint;
procedure doit;
begin
if (top+12) mod 7=0
then a[7]:=a[7]+1
else a[(top+12) mod 7]:=a[(top+12) mod 7]+1;
case j of
1,3,5,7,8,10,12:top:=(top+30) mod 7 +1;
4,6,9,11:top:=(top+29) mod 7 +1;
2:if k=1
then top:=(top+28) mod 7 +1
else top:=(top+27) mod 7 +1;
end;
end;
begin
top:=1;
k:=0;
readln(n);
for i:=0 to n-1 do
begin
m:=i+1900;
if m mod 100=0
then begin
if m mod 400=0
then k:=1;
end
else if m mod 4=0
then k:=1;
for j:=1 to 12 do
doit;
k:=0;
end;
write(a[6],' ',a[7],' ');
for i:=1 to 4 do
write(a[i],' ');
writeln(a[5]);
end.