0%

Problem 19


Problem 19


Counting Sundays

You are given the following information, but you may prefer to do some research for yourself.

  • 1 Jan 1900 was a Monday.
  • Thirty days has September,
    April, June and November.
    All the rest have thirty-one,
    Saving February alone,
    Which has twenty-eight, rain or shine.
    And on leap years, twenty-nine.
  • A leap year occurs on any year evenly divisible by 4, but not on a century unless it is divisible by 400.

How many Sundays fell on the first of the month during the twentieth century (1 Jan 1901 to 31 Dec 2000)?


周日计数

下列信息是已知的,当然你也不妨自己再验证一下:

  • 190011日是周一。
  • 三十天在九月中,
    四六十一也相同。
    剩下都是三十一,
    除去二月不统一。
    二十八天平常年,
    多加一天在闰年。
  • 闰年指的是能够被4整除却不能被100整除,或者能够被400整除的年份。

在二十世纪(190111日到20001231日)中,有多少个月的1号是周日?


Gitalking ...