C. 2023.6.2-TikTok春招(澳大利亚区域)-第三题

2023.6.2-TikTok春招(澳大利亚区域)-第三题

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.

3. The day of the week

You are given a date, year month day.Return the weekday of the date.

For clarification: A given year n is a leap year if it fulflls all following conditions:

  1. n is divisible by 4
  2. if n is divisible by 100, it must also be divisible by 400

i.e.

1996 is a leap year // 1996 is divisible by 4

2000 is a leap year // 2000 is divisible by 4, 100 and 400

2100 is a normal year // 2100 is divisible by 4, 100 but not divisible by 400

Assume that this rule has been in use since the start of the year system, e.g. year 4 is considered a leap year for purposes of this question.

Input:

1000<=year<=50001000 <= year <= 5000

1<=month<=121 <= month <= 12

1<=day<=311 <= day <= 31

Output

0<= weekday <= 6

0-6 Representing Monday Tuesday Wednesday Thursday Friday Saturday Sunday

Sample

Sample Case 0

Input

2022 7 30

Output

秋招模拟赛第30场|TikTok(Australia)|2023.06.2

Not Attended
Status
Done
Rule
IOI
Problem
5
Start at
2023-6-25 19:00
End at
2023-6-25 21:00
Duration
2 hour(s)
Host
Partic.
7