結果

問題 No.2044 Infinite Nim
ユーザー lloyzlloyz
提出日時 2022-08-19 22:53:40
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 339 bytes
コンパイル時間 367 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 21,524 KB
最終ジャッジ日時 2024-04-17 01:31:16
合計ジャッジ時間 3,706 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
10,496 KB
testcase_01 AC 31 ms
10,624 KB
testcase_02 AC 32 ms
10,624 KB
testcase_03 AC 32 ms
10,752 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 32 ms
10,624 KB
testcase_07 AC 32 ms
10,752 KB
testcase_08 AC 32 ms
10,624 KB
testcase_09 AC 32 ms
10,624 KB
testcase_10 AC 32 ms
10,496 KB
testcase_11 WA -
testcase_12 AC 33 ms
10,752 KB
testcase_13 AC 69 ms
15,676 KB
testcase_14 AC 52 ms
13,544 KB
testcase_15 AC 49 ms
12,868 KB
testcase_16 AC 50 ms
13,568 KB
testcase_17 AC 73 ms
17,680 KB
testcase_18 AC 48 ms
12,836 KB
testcase_19 AC 49 ms
12,928 KB
testcase_20 AC 64 ms
15,268 KB
testcase_21 AC 83 ms
18,088 KB
testcase_22 AC 65 ms
15,104 KB
testcase_23 AC 54 ms
14,168 KB
testcase_24 WA -
testcase_25 AC 54 ms
14,372 KB
testcase_26 WA -
testcase_27 AC 51 ms
13,056 KB
testcase_28 AC 88 ms
18,832 KB
testcase_29 WA -
testcase_30 AC 73 ms
16,472 KB
testcase_31 AC 93 ms
19,740 KB
testcase_32 AC 92 ms
19,832 KB
testcase_33 AC 93 ms
19,712 KB
testcase_34 AC 81 ms
17,024 KB
testcase_35 AC 99 ms
21,524 KB
testcase_36 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

res = 0
inf_n = 0
for i in range(n):
    if A[i] == -1:
        inf_n += 1
    else:
        res ^= A[i] - 1

if res != 0:
    if inf_n == 1:
        print("Second")
    else:
        print("First")
else:
    if inf_n % 2 == 0:
        print("Second")
    else:
        print("First")
0