結果
問題 |
No.2044 Infinite Nim
|
ユーザー |
![]() |
提出日時 | 2022-08-21 01:17:59 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 323 bytes |
コンパイル時間 | 220 ms |
コンパイル使用メモリ | 82,424 KB |
実行使用メモリ | 85,336 KB |
最終ジャッジ日時 | 2024-10-09 16:36:37 |
合計ジャッジ時間 | 3,175 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 28 WA * 6 |
ソースコード
N = int(input()) A = list(map(int, input().split())) cnt = 0 xor = 0 for i in range(N): if A[i] == -1: cnt += 1 else: xor ^= A[i] if cnt == 0: if xor: print("First") else: print("Second") else: if cnt % 2: print("First") else: print("Second")