結果

問題 No.2044 Infinite Nim
ユーザー tktk_snsntktk_snsn
提出日時 2022-08-19 21:59:25
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 309 bytes
コンパイル時間 85 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 21,260 KB
最終ジャッジ日時 2024-04-17 00:41:10
合計ジャッジ時間 3,168 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
10,496 KB
testcase_01 AC 30 ms
10,368 KB
testcase_02 AC 31 ms
10,496 KB
testcase_03 AC 30 ms
10,368 KB
testcase_04 AC 30 ms
10,240 KB
testcase_05 AC 31 ms
10,368 KB
testcase_06 AC 31 ms
10,624 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 31 ms
10,368 KB
testcase_10 AC 31 ms
10,368 KB
testcase_11 AC 31 ms
10,496 KB
testcase_12 AC 31 ms
10,368 KB
testcase_13 AC 61 ms
15,292 KB
testcase_14 AC 47 ms
13,428 KB
testcase_15 WA -
testcase_16 AC 47 ms
13,312 KB
testcase_17 AC 66 ms
17,140 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 58 ms
15,136 KB
testcase_21 WA -
testcase_22 AC 60 ms
15,232 KB
testcase_23 AC 51 ms
13,556 KB
testcase_24 AC 66 ms
16,544 KB
testcase_25 AC 51 ms
14,384 KB
testcase_26 AC 65 ms
16,764 KB
testcase_27 AC 49 ms
13,184 KB
testcase_28 AC 81 ms
18,836 KB
testcase_29 AC 55 ms
15,128 KB
testcase_30 AC 66 ms
16,472 KB
testcase_31 AC 84 ms
19,712 KB
testcase_32 AC 84 ms
19,704 KB
testcase_33 AC 86 ms
19,840 KB
testcase_34 AC 75 ms
16,964 KB
testcase_35 AC 86 ms
21,260 KB
testcase_36 AC 31 ms
10,496 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

nim = 0
inf = 0
for a in A:
    if a == -1:
        inf += 1
    else:
        nim ^= a

if inf == 0:
    if nim:
        print("First")
    else:
        print("Second")
else:
    if inf % 2 == 1:
        print("First")
    else:
        print("Second")
0