結果

問題 No.2044 Infinite Nim
ユーザー taiga0629kyoprotaiga0629kyopro
提出日時 2022-08-19 21:51:10
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 77 ms / 2,000 ms
コード長 370 bytes
コンパイル時間 196 ms
コンパイル使用メモリ 82,104 KB
実行使用メモリ 83,712 KB
最終ジャッジ日時 2024-04-17 12:02:09
合計ジャッジ時間 3,512 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
51,968 KB
testcase_01 AC 42 ms
52,224 KB
testcase_02 AC 42 ms
51,712 KB
testcase_03 AC 42 ms
52,224 KB
testcase_04 AC 42 ms
51,968 KB
testcase_05 AC 42 ms
51,712 KB
testcase_06 AC 46 ms
51,584 KB
testcase_07 AC 43 ms
52,224 KB
testcase_08 AC 42 ms
51,840 KB
testcase_09 AC 43 ms
51,840 KB
testcase_10 AC 42 ms
52,352 KB
testcase_11 AC 42 ms
51,840 KB
testcase_12 AC 42 ms
51,968 KB
testcase_13 AC 59 ms
70,016 KB
testcase_14 AC 54 ms
64,512 KB
testcase_15 AC 56 ms
66,048 KB
testcase_16 AC 55 ms
64,768 KB
testcase_17 AC 63 ms
73,088 KB
testcase_18 AC 58 ms
65,152 KB
testcase_19 AC 56 ms
65,792 KB
testcase_20 AC 59 ms
68,736 KB
testcase_21 AC 71 ms
77,312 KB
testcase_22 AC 60 ms
70,912 KB
testcase_23 AC 63 ms
66,816 KB
testcase_24 AC 67 ms
75,008 KB
testcase_25 AC 57 ms
66,432 KB
testcase_26 AC 65 ms
73,968 KB
testcase_27 AC 54 ms
65,792 KB
testcase_28 AC 70 ms
78,720 KB
testcase_29 AC 60 ms
69,632 KB
testcase_30 AC 64 ms
74,112 KB
testcase_31 AC 77 ms
81,792 KB
testcase_32 AC 76 ms
81,536 KB
testcase_33 AC 75 ms
81,280 KB
testcase_34 AC 67 ms
77,824 KB
testcase_35 AC 77 ms
83,712 KB
testcase_36 AC 42 ms
51,968 KB
権限があれば一括ダウンロードができます

ソースコード

diff #


n=int(input())
a=list(map(int,input().split()))
if min(a)==-1:
    if a.count(-1)%2==1:
        print("First")
    else:
        s=0
        for x in a:
            if x>=0:s^=x
        if s > 0:
            print("First")
        else:
            print("Second")

else:
    s=0
    for x in a:s^=x
    if s>0:
        print("First")
    else:
        print("Second")
0