D. 黑色星期五(friday)

    Type: Default 1000ms 256MiB

黑色星期五(friday)

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

说明

13号又是星期五是一个不寻常的日子吗?13号在星期五比在其他日少吗?为了回答这个问题,写一个程序来计算在n年里13日落在星期一,星期二......星期日的次数.这个测试从190011日到1900+n-11231.n是一个非负数且不大于400.这里有一些你要知道的:

  • 190011日是星期一
  • 4,6,119月有30.其他月份除了2月有31.闰年2月有29,平年2月有28
  • 年份可以被4整除的为闰年(1992=4*498 所以 1992年是闰年,但是1990年不是闰年)
  • 以上规则不适合于世纪年.可以被400整除的世纪年为闰年,否则为平年.所以,1700,1800,19002100年是平年,2000年是闰年.

输入格式

输入一个整数n(0<n<=400)

输出格式

七个在一行且相分开的整数,它们代表13日是星期六,星期日,星期一.....星期五的次数.

样例

20
36 33 34 33 35 35 34

提示

按照题意模拟。


scp-j模拟赛2023.7

Not Attended
Status
Done
Rule
OI
Problem
4
Start at
2023-9-5 22:30
End at
2023-9-7 4:30
Duration
3 hour(s)
Host
Partic.
5