結果

問題 No.2044 Infinite Nim
ユーザー satama6
提出日時 2022-10-18 23:04:51
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 246 bytes
コンパイル時間 90 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 21,640 KB
最終ジャッジ日時 2024-06-29 05:09:21
合計ジャッジ時間 3,825 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other AC * 18 WA * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int, input().split()))

grundy = 0
cnt = 0

for a in A:
    if a == 0:
        cnt += 1
    else:
        grundy ^= a

if cnt & 1:
    print('First')
elif grundy > 0:
    print('First')
else:
    print('Second')
    
0