QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#879820#9894. Lucky 7 in the PocketSxuanyanAC ✓1ms3584kbC++231.1kb2025-02-02 15:27:552025-02-02 15:27:56

Judging History

This is the latest submission verdict.

  • [2025-02-02 15:27:56]
  • Judged
  • Verdict: AC
  • Time: 1ms
  • Memory: 3584kb
  • [2025-02-02 15:27:55]
  • Submitted

answer

#include <bits/stdc++.h>
using namespace std;

void solve()
{
    int n;
    cin >> n;
    if (n >= 1 && n <= 7)
    {
        cout << 7 << endl;
    }
    else if (n > 7 && n <= 14)
    {
        cout << 14 << endl;
    }
    else if (n > 14 && n <= 21)
    {
        cout << 21 << endl;
    }
    else if (n > 21 && n <= 35)
    {
        cout << 35 << endl;
    }
    else if (n > 35 && n <= 42)
    {
        cout << 42 << endl;
    }
    else if (n > 42 && n <= 49)
    {
        cout << 49 << endl;
    }
    else if (n > 49 && n <= 63)
    {
        cout << 63 << endl;
    }
    else if (n > 63 && n <= 70)
    {
        cout << 70 << endl;
    }
    else if (n > 70 &&n<=77)
    {
        cout << 77 << endl;
    }else if (n > 77 &&n<=91)
    {
        cout << 91 << endl;
    }else if (n > 91 &&n<=98)
    {
        cout << 98 << endl;
    }else if (n > 98 &&n<=100)
    {
        cout << 105 << endl;
    }
}

int main()
{
    int t;
    cin >> t;
    while (t--)
    {
        solve();
    }

    return 0;
}

这程序好像有点Bug,我给组数据试试?

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

4
1
7
20
28

output:

7
7
21
35

result:

ok 4 lines

Test #2:

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

input:

100
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

output:

7
7
7
7
7
7
7
14
14
14
14
14
14
14
21
21
21
21
21
21
21
35
35
35
35
35
35
35
35
35
35
35
35
35
35
42
42
42
42
42
42
42
49
49
49
49
49
49
49
63
63
63
63
63
63
63
63
63
63
63
63
63
63
70
70
70
70
70
70
70
77
77
77
77
77
77
77
91
91
91
91
91
91
91
91
91
91
91
91
91
91
98
98
98
98
98
98
98
105
105

result:

ok 100 lines

Extra Test:

score: 0
Extra Test Passed