結果
| 問題 |
No.1665 quotient replace
|
| コンテスト | |
| ユーザー |
ygd.
|
| 提出日時 | 2021-09-03 22:05:30 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 427 ms / 3,000 ms |
| コード長 | 520 bytes |
| コンパイル時間 | 596 ms |
| コンパイル使用メモリ | 82,048 KB |
| 実行使用メモリ | 214,064 KB |
| 最終ジャッジ日時 | 2024-12-15 13:36:36 |
| 合計ジャッジ時間 | 14,371 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 41 |
ソースコード
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()
ygd.