結果
問題 | No.1665 quotient replace |
ユーザー |
|
提出日時 | 2021-09-03 22:58:30 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 412 bytes |
コンパイル時間 | 475 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 155,496 KB |
最終ジャッジ日時 | 2024-12-15 16:42:11 |
合計ジャッジ時間 | 166,464 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | TLE * 3 |
other | TLE * 41 |
ソースコード
n = int(input())m = 10**6+5l = [1]*mgrundy = [-1]*mgrundy[1] = 0for i in range(2,m):num = l[i]for j in range(m):if num >> j & 1:continuegrundy[i] = jbreaknum = 1<<grundy[i]for j in range(i*2,m,i):l[j] |= numans = 0A = list(map(int,input().split()))for a in A:ans ^= grundy[a]if ans:print("white")else:print("black")