QOJ.ac

QOJ

Time Limit: 1 s Memory Limit: 512 MB Total points: 100

#8631. 疯狂THU

统计

题目描述

每逢周四,都是某以T开头的大学的学生最疯狂的日子——这一定程度上是因为“星期四”一词的英文缩写(THU)与该校的英文缩写相同。因此,人们也称每周四为“疯狂THU日”。

请你编写一个程序,对于给定的日期,判断当天是否为“疯狂THU日”。

输入格式

从标准输入读入数据。

输入仅一行,三个正整数 $y,m,d$,表示询问的日期为 $y$ 年 $m$ 月 $d$ 日。

输出格式

输出到标准输出。

输出一行,如果该日期为星期四,输出 Crazy THU!,否则输出 Not crazy enough.

样例

输入

2024 2 29

输出

Crazy THU!

样例

输入

2024 3 30

输出

Not crazy enough.

解释

数据范围

对于 $10\%$ 的数据保证:$y=2024,m=2,d=29$。

对于 $30\%$ 的数据保证:$y=2024,m=2$。

对于 $50\%$ 的数据保证:$y=2024$。

对于 $70\%$ 的数据保证:$y \le 2099$。

对于所有测试数据保证:$2001\le y \le 9999$,给出的日期是合法的日期。

提示

计算星期的蔡勒公式:$w=y+[y/4]+[c/4]-2c+[13(m+1)/5]+d-1$,其中 $c$ 为年份的前两位,$y$ 为年份的后两位,$m$ 为月(其中 $1$ 月和 $2$ 月需视为上一年的 $13$ 月和 $14$ 月),$d$ 为日,$[x]$ 表示 $x$ 下取整。

计算得到的 $w$ 对 $7$ 取模(若 $w$ 为负数,则需加 $7$ 的倍数调整至非负数后再取模),得到 $0\sim 6$ 之间的整数,则 $0$ 代表星期日,$1$ 代表星期一,以此类推。

Discussions

About Discussions

The discussion section is only for posting: Editorials, 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. Submitting multiple issues may cause your account to be banned.
  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.