結果

問題 No.2044 Infinite Nim
ユーザー titiatitia
提出日時 2022-08-20 01:33:23
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 79 ms / 2,000 ms
コード長 289 bytes
コンパイル時間 292 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 21,516 KB
最終ジャッジ日時 2024-04-17 12:07:01
合計ジャッジ時間 2,952 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
10,496 KB
testcase_01 AC 26 ms
10,496 KB
testcase_02 AC 27 ms
10,496 KB
testcase_03 AC 27 ms
10,624 KB
testcase_04 AC 27 ms
10,496 KB
testcase_05 AC 26 ms
10,624 KB
testcase_06 AC 26 ms
10,496 KB
testcase_07 AC 27 ms
10,624 KB
testcase_08 AC 28 ms
10,624 KB
testcase_09 AC 27 ms
10,496 KB
testcase_10 AC 26 ms
10,624 KB
testcase_11 AC 27 ms
10,496 KB
testcase_12 AC 27 ms
10,496 KB
testcase_13 AC 53 ms
15,580 KB
testcase_14 AC 42 ms
13,548 KB
testcase_15 AC 42 ms
12,860 KB
testcase_16 AC 42 ms
13,312 KB
testcase_17 AC 58 ms
17,676 KB
testcase_18 AC 42 ms
12,828 KB
testcase_19 AC 41 ms
12,924 KB
testcase_20 AC 55 ms
15,428 KB
testcase_21 AC 70 ms
17,668 KB
testcase_22 AC 55 ms
15,136 KB
testcase_23 AC 49 ms
13,824 KB
testcase_24 AC 61 ms
16,796 KB
testcase_25 AC 47 ms
14,380 KB
testcase_26 AC 60 ms
16,764 KB
testcase_27 AC 44 ms
13,184 KB
testcase_28 AC 74 ms
18,756 KB
testcase_29 AC 50 ms
15,252 KB
testcase_30 AC 61 ms
16,252 KB
testcase_31 AC 75 ms
19,744 KB
testcase_32 AC 76 ms
19,188 KB
testcase_33 AC 77 ms
19,196 KB
testcase_34 AC 68 ms
17,164 KB
testcase_35 AC 79 ms
21,516 KB
testcase_36 AC 29 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:
    print("First")
0