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$ 代表星期一,以此类推。

About Issues

We understand that our problem archive is not perfect. If you find any issues with the problem, including the statement, scoring configuration, time/memory limits, test cases, etc.

You may use this form to submit an issue regarding the problem. A problem moderator will review your issue and proceed it properly.

STOP! Before you submit an issue, please READ the following guidelines:

  1. This is not a place to publish a discussion, editorial, or requests to debug your code. Your issue will only be visible by you and problem moderators. Other users will not be able to view or reply your issues.
  2. Do not submit duplicated issues. If you have already submitted one, please wait for an moderator to review it. Submitting multiple issues will not speed up the review process and might cause your account to be banned.
  3. Issues must be filed in English or Chinese only.
  4. Be sure your issue is related to this problem. If you need to submit an issue regarding another problem, contest, category, etc., you should submit it to the corresponding page.

Active Issues 0

No issues in this category.

Closed/Resolved Issues 0

No issues in this category.