結果

問題 No.1665 quotient replace
ユーザー ygd.ygd.
提出日時 2021-09-03 22:05:30
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 331 ms / 3,000 ms
コード長 520 bytes
コンパイル時間 466 ms
コンパイル使用メモリ 82,280 KB
実行使用メモリ 213,912 KB
最終ジャッジ日時 2024-05-09 04:10:35
合計ジャッジ時間 11,791 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 145 ms
82,412 KB
testcase_01 AC 145 ms
82,656 KB
testcase_02 AC 142 ms
83,260 KB
testcase_03 AC 147 ms
82,432 KB
testcase_04 AC 143 ms
82,956 KB
testcase_05 AC 146 ms
82,948 KB
testcase_06 AC 147 ms
83,164 KB
testcase_07 AC 149 ms
83,156 KB
testcase_08 AC 147 ms
83,584 KB
testcase_09 AC 151 ms
85,892 KB
testcase_10 AC 212 ms
138,296 KB
testcase_11 AC 285 ms
184,972 KB
testcase_12 AC 176 ms
92,112 KB
testcase_13 AC 330 ms
213,808 KB
testcase_14 AC 329 ms
213,912 KB
testcase_15 AC 331 ms
213,896 KB
testcase_16 AC 331 ms
213,800 KB
testcase_17 AC 331 ms
213,808 KB
testcase_18 AC 149 ms
82,420 KB
testcase_19 AC 147 ms
82,732 KB
testcase_20 AC 145 ms
82,692 KB
testcase_21 AC 156 ms
82,944 KB
testcase_22 AC 152 ms
82,792 KB
testcase_23 AC 150 ms
82,728 KB
testcase_24 AC 155 ms
82,412 KB
testcase_25 AC 154 ms
83,008 KB
testcase_26 AC 169 ms
83,284 KB
testcase_27 AC 155 ms
83,284 KB
testcase_28 AC 152 ms
86,272 KB
testcase_29 AC 170 ms
90,344 KB
testcase_30 AC 252 ms
145,700 KB
testcase_31 AC 287 ms
197,188 KB
testcase_32 AC 290 ms
181,916 KB
testcase_33 AC 202 ms
126,624 KB
testcase_34 AC 258 ms
154,460 KB
testcase_35 AC 254 ms
146,336 KB
testcase_36 AC 256 ms
154,536 KB
testcase_37 AC 256 ms
145,348 KB
testcase_38 AC 273 ms
168,192 KB
testcase_39 AC 228 ms
153,620 KB
testcase_40 AC 231 ms
153,492 KB
testcase_41 AC 240 ms
153,840 KB
testcase_42 AC 145 ms
82,688 KB
testcase_43 AC 153 ms
82,528 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