QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#490725 | #8631. 疯狂THU | KiharaTouma# | 100 ✓ | 0ms | 3792kb | C++23 | 446b | 2024-07-25 16:14:52 | 2024-07-25 16:14:52 |
Judging History
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!'