結果

問題 No.2044 Infinite Nim
ユーザー titiatitia
提出日時 2022-08-19 22:44:12
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 341 bytes
コンパイル時間 136 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 21,392 KB
最終ジャッジ日時 2024-04-17 01:22:00
合計ジャッジ時間 2,729 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 23 ms
10,496 KB
testcase_01 AC 25 ms
10,496 KB
testcase_02 AC 24 ms
10,368 KB
testcase_03 AC 24 ms
10,624 KB
testcase_04 AC 24 ms
10,496 KB
testcase_05 AC 27 ms
10,624 KB
testcase_06 AC 28 ms
10,368 KB
testcase_07 AC 27 ms
10,368 KB
testcase_08 AC 27 ms
10,496 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 25 ms
10,368 KB
testcase_12 AC 24 ms
10,368 KB
testcase_13 AC 48 ms
15,456 KB
testcase_14 AC 38 ms
13,420 KB
testcase_15 AC 35 ms
12,740 KB
testcase_16 AC 36 ms
13,184 KB
testcase_17 AC 53 ms
16,876 KB
testcase_18 AC 36 ms
12,708 KB
testcase_19 AC 36 ms
12,672 KB
testcase_20 AC 49 ms
15,428 KB
testcase_21 AC 61 ms
17,544 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 53 ms
16,536 KB
testcase_25 WA -
testcase_26 AC 54 ms
16,632 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 43 ms
15,252 KB
testcase_30 WA -
testcase_31 AC 68 ms
19,072 KB
testcase_32 AC 71 ms
19,068 KB
testcase_33 AC 73 ms
19,024 KB
testcase_34 AC 60 ms
17,044 KB
testcase_35 AC 68 ms
21,392 KB
testcase_36 AC 24 ms
10,496 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

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

XOR=0
zero=0
for a in A:
    if a!=-1:
        XOR^=a
    else:
        zero+=1

zero%=2

if zero==0:
    if XOR==0:
        print("Second")
    else:
        print("First")

else:
    if XOR!=0:
        print("First")
    else:
        print("Second")
0