QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#382939#6761. ChuanpailuorangjieAC ✓1ms3700kbC++14704b2024-04-08 20:24:582024-04-08 20:24:59

Judging History

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

  • [2024-04-08 20:24:59]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:3700kb
  • [2024-04-08 20:24:58]
  • 提交

answer

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

void solve() {
	int k;
	cin >> k;
	if (k > 12 || k == 1) {
		cout << 0 << endl;
	} else {
		if (k == 2 || k == 12) {
			cout << 1 << endl;
		} else if (k == 3) {
			cout << 1 << endl;
		} else if (k == 4) {
			cout << 2 << endl;
		} else if (k == 5) {
			cout << 2 << endl;
		} else if (k == 6) {
			cout << 3 << endl;
		} else if (k == 7) {
			cout << 3 << endl;
		} else if (k == 8) {
			cout << 3 << endl;
		} else if (k == 9) {
			cout << 2 << endl;
		} else if (k == 10) {
			cout << 2 << endl;
		} else if (k == 11) {
			cout << 1 << endl;
		}
	}
}

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

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

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3700kb

input:

4
4
5
8
100

output:

2
2
3
0

result:

ok 4 lines

Test #2:

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

input:

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

output:

0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
2
0
0
0
0
0
0
0
3
0
3
0
0
0
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
3
0
0
0
0
0
0
0
0
2
0
0
2
0
0
0
0
0
0
1
0
0
0
0
0
0

result:

ok 100 lines