結果

問題 No.1665 quotient replace
ユーザー ygd.ygd.
提出日時 2021-09-03 22:04:40
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 520 bytes
コンパイル時間 377 ms
コンパイル使用メモリ 82,136 KB
実行使用メモリ 213,984 KB
最終ジャッジ日時 2024-05-09 04:07:08
合計ジャッジ時間 11,347 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 142 ms
82,484 KB
testcase_01 AC 147 ms
82,736 KB
testcase_02 AC 145 ms
82,472 KB
testcase_03 AC 142 ms
82,560 KB
testcase_04 AC 144 ms
82,592 KB
testcase_05 AC 142 ms
82,676 KB
testcase_06 AC 146 ms
83,516 KB
testcase_07 AC 158 ms
83,712 KB
testcase_08 AC 147 ms
83,456 KB
testcase_09 AC 154 ms
86,056 KB
testcase_10 AC 207 ms
138,368 KB
testcase_11 AC 275 ms
184,624 KB
testcase_12 AC 159 ms
92,624 KB
testcase_13 AC 318 ms
213,536 KB
testcase_14 AC 321 ms
213,984 KB
testcase_15 AC 321 ms
213,536 KB
testcase_16 AC 324 ms
213,528 KB
testcase_17 AC 325 ms
213,792 KB
testcase_18 AC 141 ms
82,700 KB
testcase_19 AC 146 ms
82,560 KB
testcase_20 AC 148 ms
82,944 KB
testcase_21 AC 150 ms
83,072 KB
testcase_22 AC 143 ms
82,748 KB
testcase_23 AC 145 ms
82,560 KB
testcase_24 AC 146 ms
82,688 KB
testcase_25 AC 144 ms
82,676 KB
testcase_26 AC 145 ms
83,364 KB
testcase_27 AC 144 ms
83,228 KB
testcase_28 AC 147 ms
86,272 KB
testcase_29 AC 163 ms
91,108 KB
testcase_30 AC 261 ms
145,684 KB
testcase_31 AC 279 ms
197,144 KB
testcase_32 WA -
testcase_33 AC 195 ms
126,464 KB
testcase_34 AC 260 ms
154,508 KB
testcase_35 AC 251 ms
146,312 KB
testcase_36 WA -
testcase_37 AC 247 ms
146,004 KB
testcase_38 AC 268 ms
168,272 KB
testcase_39 AC 233 ms
153,856 KB
testcase_40 AC 229 ms
153,472 KB
testcase_41 AC 243 ms
153,984 KB
testcase_42 WA -
testcase_43 AC 148 ms
82,416 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

def main():
    N = int(input())
    MAX = pow(10,6) + 10
    Groundy = [1]*MAX
    Groundy[1] = 1
    for i in range(2,MAX):
        val = Groundy[i] + 1
        x = i
        while x + i < MAX:
            x += i
            Groundy[x] = max(Groundy[x], val)
    #print(Groundy)
    A = list(map(int,input().split()))
    x = 0
    for a in A:
        x ^= Groundy[a]
    if x == 0:
        print("black")
    else:
        print("white")



if __name__ == "__main__":
    main()
0