QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#490725#8631. 疯狂THUKiharaTouma#100 ✓0ms3792kbC++23446b2024-07-25 16:14:522024-07-25 16:14:52

Judging History

你现在查看的是最新测评结果

  • [2024-07-25 16:14:52]
  • 评测
  • 测评结果:100
  • 用时:0ms
  • 内存:3792kb
  • [2024-07-25 16:14:52]
  • 提交

answer

//qoj8631
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main(){
	int T = 1;
	while(T--){
		int y, m, d;
		scanf("%d%d%d", &y, &m, &d);
		if(m <= 2){
			-- y;
			m += 12;
		}
		int c = y / 100;
		y %= 100;
		int w = y + y / 4 + c / 4 - c - c;
		w += 13 * (m+1) / 5 + d - 1;
		w = (w % 7 + 7) % 7;
		if(w == 4){
			puts("Crazy THU!");
		} else {
			puts("Not crazy enough.");
		}
	}
	return 0;
}

詳細信息


Pretests


Final Tests

Test #1:

score: 10
Accepted
time: 0ms
memory: 3672kb

input:

2024 2 29

output:

Crazy THU!

result:

ok single line: 'Crazy THU!'

Test #2:

score: 10
Accepted
time: 0ms
memory: 3792kb

input:

2024 2 11

output:

Not crazy enough.

result:

ok single line: 'Not crazy enough.'

Test #3:

score: 10
Accepted
time: 0ms
memory: 3608kb

input:

2024 2 8

output:

Crazy THU!

result:

ok single line: 'Crazy THU!'

Test #4:

score: 10
Accepted
time: 0ms
memory: 3564kb

input:

2024 9 12

output:

Crazy THU!

result:

ok single line: 'Crazy THU!'

Test #5:

score: 10
Accepted
time: 0ms
memory: 3724kb

input:

2024 11 11

output:

Not crazy enough.

result:

ok single line: 'Not crazy enough.'

Test #6:

score: 10
Accepted
time: 0ms
memory: 3560kb

input:

2003 10 9

output:

Crazy THU!

result:

ok single line: 'Crazy THU!'

Test #7:

score: 10
Accepted
time: 0ms
memory: 3600kb

input:

2097 1 26

output:

Not crazy enough.

result:

ok single line: 'Not crazy enough.'

Test #8:

score: 10
Accepted
time: 0ms
memory: 3560kb

input:

9700 3 3

output:

Not crazy enough.

result:

ok single line: 'Not crazy enough.'

Test #9:

score: 10
Accepted
time: 0ms
memory: 3728kb

input:

5897 2 5

output:

Not crazy enough.

result:

ok single line: 'Not crazy enough.'

Test #10:

score: 10
Accepted
time: 0ms
memory: 3564kb

input:

3906 12 6

output:

Crazy THU!

result:

ok single line: 'Crazy THU!'