結果

問題 No.2044 Infinite Nim
ユーザー dachengzdachengz
提出日時 2022-11-16 07:04:26
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 237 bytes
コンパイル時間 182 ms
コンパイル使用メモリ 81,760 KB
実行使用メモリ 77,024 KB
最終ジャッジ日時 2023-10-17 06:36:01
合計ジャッジ時間 4,977 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,320 KB
testcase_01 AC 38 ms
53,320 KB
testcase_02 AC 38 ms
53,320 KB
testcase_03 AC 38 ms
53,320 KB
testcase_04 AC 38 ms
53,320 KB
testcase_05 AC 38 ms
53,320 KB
testcase_06 AC 38 ms
53,320 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 37 ms
53,320 KB
testcase_10 AC 38 ms
53,320 KB
testcase_11 AC 38 ms
53,320 KB
testcase_12 AC 37 ms
53,320 KB
testcase_13 AC 51 ms
67,516 KB
testcase_14 AC 48 ms
63,368 KB
testcase_15 WA -
testcase_16 AC 46 ms
63,336 KB
testcase_17 AC 52 ms
68,708 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 51 ms
67,120 KB
testcase_21 WA -
testcase_22 AC 51 ms
67,812 KB
testcase_23 AC 48 ms
64,228 KB
testcase_24 AC 53 ms
69,096 KB
testcase_25 AC 49 ms
65,996 KB
testcase_26 AC 52 ms
68,600 KB
testcase_27 AC 46 ms
63,532 KB
testcase_28 AC 58 ms
73,424 KB
testcase_29 AC 50 ms
66,908 KB
testcase_30 AC 54 ms
69,292 KB
testcase_31 AC 58 ms
73,876 KB
testcase_32 AC 58 ms
73,864 KB
testcase_33 AC 59 ms
73,864 KB
testcase_34 AC 53 ms
70,512 KB
testcase_35 AC 59 ms
77,024 KB
testcase_36 AC 38 ms
53,320 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

cnt_n1 = 0
xorval = 0
for a in A:
	if a == -1:
		cnt_n1 += 1
	else:
		xorval ^= a

if cnt_n1 == 0:
	print("First" if xorval else "Second")
else:
	print("First" if cnt_n1 & 1 else "Second")
0