QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#879819 | #9894. Lucky 7 in the Pocket | Sxuanyan | WA | 1ms | 3584kb | C++23 | 1.1kb | 2025-02-02 15:26:54 | 2025-02-02 15:26:55 |
Judging History
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 << 135 << endl;
}
}
int main()
{
int t;
cin >> t;
while (t--)
{
solve();
}
return 0;
}
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: -100
Wrong Answer
time: 1ms
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 135 135
result:
wrong answer 99th lines differ - expected: '105', found: '135'