結果

問題 No.2044 Infinite Nim
ユーザー satama6satama6
提出日時 2022-10-18 23:04:51
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 246 bytes
コンパイル時間 95 ms
コンパイル使用メモリ 10,500 KB
実行使用メモリ 18,804 KB
最終ジャッジ日時 2023-09-11 14:59:34
合計ジャッジ時間 4,079 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,868 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 15 ms
7,780 KB
testcase_04 AC 15 ms
7,852 KB
testcase_05 AC 15 ms
7,860 KB
testcase_06 AC 15 ms
7,772 KB
testcase_07 AC 15 ms
7,908 KB
testcase_08 AC 15 ms
7,752 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 28 ms
10,596 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 27 ms
10,496 KB
testcase_19 AC 29 ms
10,780 KB
testcase_20 WA -
testcase_21 AC 50 ms
16,192 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 44 ms
14,588 KB
testcase_25 WA -
testcase_26 AC 42 ms
14,236 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 34 ms
12,652 KB
testcase_30 WA -
testcase_31 AC 62 ms
18,012 KB
testcase_32 AC 61 ms
18,092 KB
testcase_33 AC 62 ms
18,156 KB
testcase_34 AC 52 ms
16,004 KB
testcase_35 AC 61 ms
18,804 KB
testcase_36 WA -
権限があれば一括ダウンロードができます

ソースコード

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