标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 2, in <module>
from numba import njit
ModuleNotFoundError: No module named 'numba'
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 1
编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#31613 | #2054. 1e9+7 | Wrong Answer | 0 | 220 ms | 2892 K | Python 3 / 759 B | banned24 | 2025-03-16 18:47:56 |
import sys
from numba import njit
@njit
def compute_parity(p, n):
cnt = 0
i = 1
while i <= p:
v = n // i
# i_max 为使得 n // i 仍然等于 v 的最大 i
i_max = n // v
if i_max > p:
i_max = p
cnt += 1
i = i_max + 1
# 返回 cnt 的奇偶性(奇数返回1,偶数返回0)
return 1 if cnt & 1 else 0
def main():
data = sys.stdin.read().split()
t = int(data[0])
n = 10**9 + 7
idx = 1
out_lines = []
for _ in range(t):
p = int(data[idx])
idx += 1
res = compute_parity(p, n)
out_lines.append(str(res))
sys.stdout.write("\n".join(out_lines))
if __name__ == "__main__":
main()
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 2, in <module>
from numba import njit
ModuleNotFoundError: No module named 'numba'
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 1
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 2, in <module>
from numba import njit
ModuleNotFoundError: No module named 'numba'
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 1
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 2, in <module>
from numba import njit
ModuleNotFoundError: No module named 'numba'
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 1
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 2, in <module>
from numba import njit
ModuleNotFoundError: No module named 'numba'
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 1
30
5370
6356
879
2340
6892
42
4476
9374
3069
8096
7499
2588
2517
2580
5161
8934
216
<80 bytes omitted>
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 2, in <module>
from numba import njit
ModuleNotFoundError: No module named 'numba'
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 1
30
5272
9286
6777
8374
9687
82
7386
5278
2188
8803
6344
6942
2799
3656
4766
2857
89
<81 bytes omitted>
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 2, in <module>
from numba import njit
ModuleNotFoundError: No module named 'numba'
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 1
50
10605
12336
82254
59343
8639
2191
33736
76559
13882
61739
44005
7002
58514
26070
1
<248 bytes omitted>
1
0
0
1
1
1
0
7
0
1
1
0
4
0
1
0
0
4
0
7
0
2
0
4
0
1
0
1
1
2
0
0
5
1
<52 bytes omitted>
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 2, in <module>
from numba import njit
ModuleNotFoundError: No module named 'numba'
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 1
50
68528
75214
15697
29758
73410
87131
86416
47935
25623
36342
88207
32312
7532
12908
<252 bytes omitted>
2
2
1
0
6
13
10
3
1
2
13
2
0
0
1
2
0
2
4
1
0
1
5
2
1
0
0
0
7
1
1
0
0
<54 bytes omitted>
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 2, in <module>
from numba import njit
ModuleNotFoundError: No module named 'numba'
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 1
100
420511831
331849740
971956497
887214209
315415875
342270259
439736135
891407307
9871591
<996 bytes omitted>
39992223
122125250
312367933
430656589
4308107
131619651
17274223
434848251
330715752
14373
<920 bytes omitted>
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 2, in <module>
from numba import njit
ModuleNotFoundError: No module named 'numba'
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 1
100
400669939
162817605
201543415
333556237
382564404
90963351
103039212
70025871
312497661
<993 bytes omitted>
55803651
16390629
21686847
122904617
96416322
2814475
9357646
1070879
1979701
54294458
462
<919 bytes omitted>
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 2, in <module>
from numba import njit
ModuleNotFoundError: No module named 'numba'
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 1
500
192863168
487841518
405711727
654509041
887017258
879348196
239922904
383532972
5175304
<5350 bytes omitted>
19823754
241540360
50359943
126532061
430853396
404964306
54282782
95288010
263477570
44917
<5029 bytes omitted>
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 2, in <module>
from numba import njit
ModuleNotFoundError: No module named 'numba'
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 1