Logo
(追記) (追記ここまで)

33358번 - I Flipped The Calendar... 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 2048 MB116744656.790%

문제

While flipping through the calendar, Nikolai wondered: how many rows are in the calendar for a specific year?

The calendar consists of 12 sheets, each corresponding to a month from January to December. Each sheet lists all the days of the respective month. The days on each sheet are arranged in rows by week: the days of one week are in one row, the days of different weeks are in different rows. In this calendar, the week starts on Monday.

For example, if a month has 31 days and the first day of the month is Sunday (as in January 2023), then there will be six rows on the calendar sheet for that month:

1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31

Remember that in a leap year, February has 29 days, and in a non-leap year, it has 28 days. A year is considered a leap year if its number is divisible by 400 or divisible by 4 but not by 100. For example, 2000, 2004, and 2040 are leap years, while 1900, 1982, and 2039 are not.

입력

The first line contains the year number $y$ (1970ドル \le y \le 2037$).

출력

Output the number of rows in the calendar for the given year.

제한

예제 입력 1

2023

예제 출력 1

63

힌트

출처

Camp > Petrozavodsk Programming Camp > Summer 2023 > Day 4: SPb SU Contest, LVII SPb SU Championship B번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /