QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#426196#7606. Digital Nimreal_sigma_team#WA 1ms3732kbC++20793b2024-05-30 22:26:132024-05-30 22:26:14

Judging History

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

  • [2024-05-30 22:26:14]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3732kb
  • [2024-05-30 22:26:13]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

const int N = 1e5;

bool dp[N];

signed main() {
    cin.tie(nullptr)->sync_with_stdio(false);

    int tests;
    cin >> tests;
    while (tests--) {
        long long n;
        cin >> n;
        if (n % 10 != 0) cout << "Algosia\n";
        else {
            int sm = 0;
            while (n) sm += n % 10, n /= 10;
            if (sm >= 10 & sm % 2 == 0) cout << "Algosia\n";
            else cout << "Bajtek\n";
        }
    }
    return 0;
    for (int i = 0; i < N; ++i) {
        int sm = 0;
        for (int x = i; x; sm += x % 10, x /= 10);
        for (int j = i - sm / 10; j < i; ++j) if (!dp[j]) dp[i] = true;
    }
    for (int i = 0; i < 200; ++i) {
        if (dp[i]) cout << i << endl;
    }
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3732kb

input:

4
1
10
42
190

output:

Algosia
Bajtek
Algosia
Algosia

result:

ok 4 lines

Test #2:

score: 0
Accepted
time: 0ms
memory: 3692kb

input:

1
1

output:

Algosia

result:

ok single line: 'Algosia'

Test #3:

score: -100
Wrong Answer
time: 0ms
memory: 3624kb

input:

10000
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
10...

output:

Algosia
Algosia
Algosia
Algosia
Algosia
Algosia
Algosia
Algosia
Algosia
Bajtek
Algosia
Algosia
Algosia
Algosia
Algosia
Algosia
Algosia
Algosia
Algosia
Bajtek
Algosia
Algosia
Algosia
Algosia
Algosia
Algosia
Algosia
Algosia
Algosia
Bajtek
Algosia
Algosia
Algosia
Algosia
Algosia
Algosia
Algosia
Algosia...

result:

wrong answer 1900th lines differ - expected: 'Bajtek', found: 'Algosia'