Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
167904 B班 李文乐 二进制半整数 C++ 解答错误 40 4 MS 248 KB 383 2024-08-19 20:29:01

Tests(2/5):


#include <bits/stdc++.h> using namespace std; bool f(int n) { int cnt = 0; while (n) { cnt += n & 1; if (cnt > 2) return false; n >>= 1; } return cnt == 2; } int main() { int t; cin >> t; while (t--) { int n; cin >> n; cout << (f(n) ? "yes" : "no") << endl; } return 0; }


测评信息:

输入

1000
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

输出

no
no
yes
no
yes
yes
no
no
yes
yes
no
yes
no
no
no
no
yes
yes
no
yes
no
no
no
yes
no
no
no
no
no
no
no
no
yes
yes
no
yes
no
no
no
yes
no
no
no
no
no
no
no
yes
no
no
no
no
no
no
no
no
no
no
no
no
no
n...

答案

no
yes
yes
yes
yes
yes
no
yes
yes
yes
no
yes
no
no
no
yes
yes
yes
no
yes
no
no
no
yes
no
no
no
no
no
no
no
yes
yes
yes
no
yes
no
no
no
yes
no
no
no
no
no
no
no
yes
no
no
no
no
no
no
no
no
no
no
no
no

系统信息

exit code: 0, checker exit code: 0

输入

                    

输出

                    

答案

                    

系统信息

exit code: 0, checker exit code: 0

输入

                    

输出

                    

答案

                    

系统信息

exit code: 0, checker exit code: 0

输入

1000
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038

输出

no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
yes
yes
no
yes
no
no
no
yes
no
no
no
no
no
no
no
yes

答案

no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
no
yes
yes
yes
no
yes
no
no
no
yes
no
no
no
no
no
no
no
ye...

系统信息

exit code: 0, checker exit code: 0

输入

1000
3072
5120
9216
17408
33792
66560
132096
263168
525312
1049600
2098176
4195328
8389632
16778240
33555456
67109888
134218752
268436480
536871936
4096
6144
10240
18432
34816
67584
133120
264192
526...

输出

yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
no
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
no
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
y...

答案

yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes

系统信息

exit code: 0, checker exit code: 0