結果

問題 No.1665 quotient replace
ユーザー ああいいああいい
提出日時 2022-03-12 01:09:59
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 316 ms / 3,000 ms
コード長 413 bytes
コンパイル時間 1,788 ms
コンパイル使用メモリ 86,336 KB
実行使用メモリ 259,236 KB
最終ジャッジ日時 2023-10-14 10:28:45
合計ジャッジ時間 13,198 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 106 ms
83,748 KB
testcase_01 AC 107 ms
84,000 KB
testcase_02 AC 109 ms
83,760 KB
testcase_03 AC 117 ms
83,724 KB
testcase_04 AC 111 ms
83,964 KB
testcase_05 AC 111 ms
83,768 KB
testcase_06 AC 114 ms
84,088 KB
testcase_07 AC 113 ms
83,976 KB
testcase_08 AC 112 ms
84,092 KB
testcase_09 AC 117 ms
86,632 KB
testcase_10 AC 187 ms
129,676 KB
testcase_11 AC 260 ms
179,992 KB
testcase_12 AC 134 ms
96,556 KB
testcase_13 AC 316 ms
258,388 KB
testcase_14 AC 311 ms
257,828 KB
testcase_15 AC 305 ms
258,488 KB
testcase_16 AC 313 ms
259,236 KB
testcase_17 AC 307 ms
258,228 KB
testcase_18 AC 110 ms
83,796 KB
testcase_19 AC 107 ms
83,852 KB
testcase_20 AC 110 ms
83,884 KB
testcase_21 AC 108 ms
83,888 KB
testcase_22 AC 114 ms
84,192 KB
testcase_23 AC 112 ms
84,036 KB
testcase_24 AC 106 ms
83,924 KB
testcase_25 AC 107 ms
83,868 KB
testcase_26 AC 111 ms
84,148 KB
testcase_27 AC 111 ms
84,300 KB
testcase_28 AC 120 ms
87,312 KB
testcase_29 AC 123 ms
93,496 KB
testcase_30 AC 205 ms
157,836 KB
testcase_31 AC 262 ms
198,600 KB
testcase_32 AC 238 ms
174,420 KB
testcase_33 AC 177 ms
115,288 KB
testcase_34 AC 236 ms
185,576 KB
testcase_35 AC 225 ms
171,784 KB
testcase_36 AC 229 ms
183,160 KB
testcase_37 AC 206 ms
157,900 KB
testcase_38 AC 244 ms
198,296 KB
testcase_39 AC 197 ms
147,052 KB
testcase_40 AC 199 ms
147,112 KB
testcase_41 AC 194 ms
147,188 KB
testcase_42 AC 107 ms
84,036 KB
testcase_43 AC 108 ms
83,948 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int,input().split()))
C = 10 ** 6 + 1
dat = [0] * C
for i in range(2,C):
    if dat[i] == 0:
        for j in range(i,C,i):
            dat[j] += 1
        now = i * i
        while now < C:
            for j in range(now,C,now):
                dat[j] += 1
            now *= i
grundy = 0
for a in A:
    grundy ^= dat[a]
if grundy:
    print("white")
else:
    print("black")
    
0