Problem 19 » 履歴 » バージョン 1
Noppi, 2024/01/01 14:26
| 1 | 1 | Noppi | [ホーム](https://redmine.noppi.jp) - [[Wiki|Project Euler]] |
|---|---|---|---|
| 2 | # [[Problem 19]] |
||
| 3 | |||
| 4 | ## Counting Sundays |
||
| 5 | You are given the following information, but you may prefer to do some research for yourself. |
||
| 6 | |||
| 7 | * 1 Jan 1900 was a Monday. |
||
| 8 | * Thirty days has September, April, June and November. |
||
| 9 | All the rest have thirty-one, |
||
| 10 | Saving February alone, |
||
| 11 | Which has twenty-eight, rain or shine. |
||
| 12 | And on leap years, twenty-nine. |
||
| 13 | * A leap year occurs on any year evenly divisible by 4, but not on a century unless it is divisible by 400. |
||
| 14 | |||
| 15 | How many Sundays fell on the first of the month during the twentieth century (1 Jan 1901 to 31 Dec 2000)? |
||
| 16 | |||
| 17 | ## 日曜日の数え上げ |
||
| 18 | 次の情報が与えられている. |
||
| 19 | |||
| 20 | * 1900年1月1日は月曜日である. |
||
| 21 | * 9月, 4月, 6月, 11月は30日まであり, 2月を除く他の月は31日まである. |
||
| 22 | * 2月は28日まであるが, うるう年のときは29日である. |
||
| 23 | * うるう年は西暦が4で割り切れる年に起こる. しかし, 西暦が400で割り切れず100で割り切れる年はうるう年でない. |
||
| 24 | |||
| 25 | 20世紀(1901年1月1日から2000年12月31日)中に月の初めが日曜日になるのは何回あるか? |
||
| 26 | |||
| 27 | ```scheme |
||
| 28 | ``` |