結果
問題 | No.1665 quotient replace |
ユーザー | satama6 |
提出日時 | 2022-10-18 23:26:20 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 351 bytes |
コンパイル時間 | 638 ms |
コンパイル使用メモリ | 87,116 KB |
実行使用メモリ | 196,092 KB |
最終ジャッジ日時 | 2023-09-11 15:17:21 |
合計ジャッジ時間 | 9,793 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 69 ms
196,092 KB |
testcase_01 | AC | 69 ms
71,340 KB |
testcase_02 | AC | 69 ms
71,436 KB |
testcase_03 | AC | 86 ms
75,604 KB |
testcase_04 | AC | 89 ms
75,600 KB |
testcase_05 | AC | 79 ms
75,388 KB |
testcase_06 | AC | 194 ms
77,068 KB |
testcase_07 | AC | 96 ms
76,600 KB |
testcase_08 | AC | 132 ms
76,248 KB |
testcase_09 | AC | 431 ms
79,664 KB |
testcase_10 | TLE | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
testcase_31 | -- | - |
testcase_32 | -- | - |
testcase_33 | -- | - |
testcase_34 | -- | - |
testcase_35 | -- | - |
testcase_36 | -- | - |
testcase_37 | -- | - |
testcase_38 | -- | - |
testcase_39 | -- | - |
testcase_40 | -- | - |
testcase_41 | -- | - |
testcase_42 | -- | - |
testcase_43 | -- | - |
ソースコード
def factor(N): factor = set() i = 1 while i*i <= N: if N % i == 0: factor.add(i) factor.add(N // i) i += 1 return len(factor) - 1 N = int(input()) A = list(map(int, input().split())) grundy = 0 for a in A: grundy ^= factor(a) if grundy == 0: print('black') else: print('white')