> Run 4: Execution error: Your program did not produce an answer that was judged as correct. The program stopped at 0.000 seconds; it used 208 KB of memory. Here are the respective outputs: ----- our output --------- 23_21_22_22_24_21_23 ---- your output --------- 22_22_21_23_22_22_24 -------------------------- ------ Data for Run 4 ------ 13 ---------------------------- |
ID:fy111111
PROG:friday
LANG:PASCAL
}
var
s,a:array[0..12]of longint;
n,m,i,j,k:longint;
procedure aa(q:longint);
begin
if q<>2 then
case q of
1,3,5,7,8,10,12:a[q]:=31;
4,6,9,11:a[q]:=30;
end
else if (1900+i) mod 400=0 then a[2]:=29
else if (1900+i) mod 100=0 then a[2]:=28
else if (1900+i) mod 4=0 then a[2]:=29;
end;
begin
assign(input,'friday.in');reset(input);
assign(output,'friday.out');rewrite(output);
readln(n);
m:=13;i:=0;
k:=m mod 7;
inc(s[k]);
repeat
for j:=1 to 11 do
begin
aa(j);
m:=m+a[j];
k:=m mod 7;
inc(s[k]);
end;
if i<>n-1 then
begin
aa(12);
m:=m+a[12];
k:=m mod 7;
inc(s[k]);
end;
inc(i);
until i=n;
write(s[6],' ');
for i:=0 to 4 do
write(s[i],' ');
write(s[5]);
writeln;
close(input);
close(output);
end.