QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#448414#8631. 疯狂THUonly360 0ms3716kbC++14860b2024-06-19 16:33:402024-06-19 16:33:40

Judging History

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

  • [2024-06-19 16:33:40]
  • 评测
  • 测评结果:60
  • 用时:0ms
  • 内存:3716kb
  • [2024-06-19 16:33:40]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr), cout.tie(nullptr);

    int y, m, d;
    cin >> y >> m >> d;

    int c = y / 100;
    int cnt = (m + 14 - 2) % 14;

    int ans = y / 100 + (((y / 100) - 1) / 4) + ((c - 1) / 4) - 2 * c + (13 * (cnt + 1) - 1) / 5 + d - 1;

    if (ans >= 0)
    {
        if (ans % 7 == 4)
        {
            cout << "Crazy THU!" << endl;
        }
        else
        {
            cout << "Not crazy enough." << endl;
        }
    }
    else
    {
        while (ans > 0)
        {
            ans += 7;
        }

        if (ans % 7 == 4)
        {
            cout << "Crazy THU!" << endl;
        }
        else
        {
            cout << "Not crazy enough." << endl;
        }
    }

    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

2024 2 29

output:

Crazy THU!

result:

ok single line: 'Crazy THU!'

Test #2:

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

input:

2024 2 11

output:

Not crazy enough.

result:

ok single line: 'Not crazy enough.'

Test #3:

score: 0
Wrong Answer
time: 0ms
memory: 3636kb

input:

2024 2 8

output:

Not crazy enough.

result:

wrong answer 1st lines differ - expected: 'Crazy THU!', found: 'Not crazy enough.'

Test #4:

score: 0
Wrong Answer
time: 0ms
memory: 3700kb

input:

2024 9 12

output:

Not crazy enough.

result:

wrong answer 1st lines differ - expected: 'Crazy THU!', found: 'Not crazy enough.'

Test #5:

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

input:

2024 11 11

output:

Not crazy enough.

result:

ok single line: 'Not crazy enough.'

Test #6:

score: 0
Wrong Answer
time: 0ms
memory: 3716kb

input:

2003 10 9

output:

Not crazy enough.

result:

wrong answer 1st lines differ - expected: 'Crazy THU!', found: 'Not crazy enough.'

Test #7:

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

input:

2097 1 26

output:

Not crazy enough.

result:

ok single line: 'Not crazy enough.'

Test #8:

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

input:

9700 3 3

output:

Not crazy enough.

result:

ok single line: 'Not crazy enough.'

Test #9:

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

input:

5897 2 5

output:

Not crazy enough.

result:

ok single line: 'Not crazy enough.'

Test #10:

score: 0
Wrong Answer
time: 0ms
memory: 3636kb

input:

3906 12 6

output:

Not crazy enough.

result:

wrong answer 1st lines differ - expected: 'Crazy THU!', found: 'Not crazy enough.'