結果

問題 No.2044 Infinite Nim
ユーザー lam6er
提出日時 2025-03-20 20:37:23
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 244 bytes
コンパイル時間 189 ms
コンパイル使用メモリ 82,772 KB
実行使用メモリ 88,640 KB
最終ジャッジ日時 2025-03-20 20:38:17
合計ジャッジ時間 3,070 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 25 WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

n, *rest = map(int, open(0).read().split())
a = rest[:n]

has_infinite = any(x == -1 for x in a)
if has_infinite:
    print("First")
else:
    xor_sum = 0
    for num in a:
        xor_sum ^= num
    print("First" if xor_sum != 0 else "Second")
0