結果

問題 No.1665 quotient replace
ユーザー lloyzlloyz
提出日時 2021-11-29 21:05:28
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 402 bytes
コンパイル時間 279 ms
コンパイル使用メモリ 86,844 KB
実行使用メモリ 259,356 KB
最終ジャッジ日時 2023-09-15 09:30:35
合計ジャッジ時間 11,476 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
84,284 KB
testcase_01 AC 121 ms
84,152 KB
testcase_02 AC 120 ms
84,340 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 124 ms
84,232 KB
testcase_06 AC 124 ms
84,480 KB
testcase_07 AC 121 ms
84,336 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 199 ms
129,672 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 367 ms
258,324 KB
testcase_18 AC 122 ms
84,212 KB
testcase_19 WA -
testcase_20 AC 123 ms
84,272 KB
testcase_21 AC 122 ms
84,208 KB
testcase_22 AC 124 ms
84,076 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 121 ms
84,420 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 260 ms
174,516 KB
testcase_33 AC 193 ms
115,576 KB
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 AC 236 ms
157,896 KB
testcase_38 AC 270 ms
198,840 KB
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
A = list(map(int, input().split()))

prime = [True for _ in range(10**6 + 1)]
prime[0] = prime[1] = False
for i in range(2, 10**6 + 1):
    if not prime[i]:
        continue
    for j in range(2 * i, 10**6 + 1, i):
        prime[j] = False

prime_num = 0
for i in range(n):
    if prime[A[i]]:
        prime_num += 1

if prime_num % 2 == 0:
    print("white")
else:
    print("black")
0