結果

問題 No.1665 quotient replace
ユーザー ygd.ygd.
提出日時 2021-09-03 22:05:30
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 430 ms / 3,000 ms
コード長 520 bytes
コンパイル時間 409 ms
コンパイル使用メモリ 87,040 KB
実行使用メモリ 219,248 KB
最終ジャッジ日時 2023-08-21 21:59:48
合計ジャッジ時間 15,520 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 203 ms
83,716 KB
testcase_01 AC 225 ms
83,780 KB
testcase_02 AC 215 ms
83,532 KB
testcase_03 AC 206 ms
83,768 KB
testcase_04 AC 198 ms
83,804 KB
testcase_05 AC 196 ms
83,812 KB
testcase_06 AC 201 ms
84,556 KB
testcase_07 AC 204 ms
84,612 KB
testcase_08 AC 206 ms
84,428 KB
testcase_09 AC 220 ms
87,232 KB
testcase_10 AC 276 ms
139,440 KB
testcase_11 AC 342 ms
188,368 KB
testcase_12 AC 220 ms
95,944 KB
testcase_13 AC 393 ms
219,248 KB
testcase_14 AC 428 ms
219,096 KB
testcase_15 AC 430 ms
219,036 KB
testcase_16 AC 412 ms
218,812 KB
testcase_17 AC 413 ms
219,016 KB
testcase_18 AC 240 ms
83,980 KB
testcase_19 AC 306 ms
83,584 KB
testcase_20 AC 251 ms
84,000 KB
testcase_21 AC 229 ms
84,016 KB
testcase_22 AC 215 ms
83,764 KB
testcase_23 AC 205 ms
83,812 KB
testcase_24 AC 214 ms
83,948 KB
testcase_25 AC 217 ms
83,928 KB
testcase_26 AC 210 ms
84,704 KB
testcase_27 AC 209 ms
84,592 KB
testcase_28 AC 215 ms
87,508 KB
testcase_29 AC 233 ms
92,792 KB
testcase_30 AC 309 ms
149,096 KB
testcase_31 AC 353 ms
201,244 KB
testcase_32 AC 349 ms
186,440 KB
testcase_33 AC 267 ms
127,668 KB
testcase_34 AC 348 ms
160,784 KB
testcase_35 AC 321 ms
148,912 KB
testcase_36 AC 325 ms
157,640 KB
testcase_37 AC 310 ms
148,968 KB
testcase_38 AC 357 ms
170,604 KB
testcase_39 AC 306 ms
154,448 KB
testcase_40 AC 311 ms
154,784 KB
testcase_41 AC 304 ms
154,424 KB
testcase_42 AC 231 ms
83,488 KB
testcase_43 AC 230 ms
83,784 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

def main():
    N = int(input())
    MAX = pow(10,6) + 10
    Groundy = [1]*MAX
    Groundy[1] = 0
    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