QOJ.ac

QOJ

実行時間制限: 1 s メモリ制限: 512 MB 満点: 100

#8631. Crazy THU

統計

Every Thursday is the craziest day for students at a certain university starting with the letter T—this is partly because the English abbreviation for "Thursday" (THU) is the same as the university's abbreviation. Therefore, people also call every Thursday "Crazy THU Day."

Please write a program that determines whether a given date is a "Crazy THU Day."

Input

The input is read from standard input.

The input consists of a single line containing three positive integers $y, m, d$, representing the date $y$ year $m$ month $d$ day.

Output

The output is written to standard output.

Output a single line. If the date is a Thursday, output Crazy THU!. Otherwise, output Not crazy enough..

Examples

Input 1

2024 2 29

Output 1

Crazy THU!

Input 2

2024 3 30

Output 2

Not crazy enough.

Constraints

For $10\%$ of the data, it is guaranteed that $y=2024, m=2, d=29$.

For $30\%$ of the data, it is guaranteed that $y=2024, m=2$.

For $50\%$ of the data, it is guaranteed that $y=2024$.

For $70\%$ of the data, it is guaranteed that $y \le 2099$.

For all test data, it is guaranteed that $2001 \le y \le 9999$, and the given date is a valid date.

Note

Zeller's congruence for calculating the day of the week is: $w=y+[y/4]+[c/4]-2c+[13(m+1)/5]+d-1$, where $c$ is the first two digits of the year, $y$ is the last two digits of the year, $m$ is the month (where January and February are treated as months 13 and 14 of the previous year), $d$ is the day, and $[x]$ denotes the floor function.

Taking the calculated $w$ modulo $7$ (if $w$ is negative, add a multiple of $7$ to make it non-negative before taking the modulo) results in an integer between $0$ and $6$, where $0$ represents Sunday, $1$ represents Monday, and so on.

Editorials

IDTypeStatusTitlePosted ByLast UpdatedActions
EditorialOpen Official EditorialQingyu- Download

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.