結果

問題 No.2044 Infinite Nim
ユーザー dachengzdachengz
提出日時 2022-11-16 07:14:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 59 ms / 2,000 ms
コード長 266 bytes
コンパイル時間 187 ms
コンパイル使用メモリ 81,576 KB
実行使用メモリ 77,028 KB
最終ジャッジ日時 2023-10-17 06:44:54
合計ジャッジ時間 3,439 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,320 KB
testcase_01 AC 37 ms
53,320 KB
testcase_02 AC 38 ms
53,320 KB
testcase_03 AC 38 ms
53,320 KB
testcase_04 AC 37 ms
53,320 KB
testcase_05 AC 38 ms
53,320 KB
testcase_06 AC 38 ms
53,320 KB
testcase_07 AC 37 ms
53,320 KB
testcase_08 AC 38 ms
53,320 KB
testcase_09 AC 37 ms
53,320 KB
testcase_10 AC 37 ms
53,320 KB
testcase_11 AC 38 ms
53,320 KB
testcase_12 AC 38 ms
53,320 KB
testcase_13 AC 51 ms
67,520 KB
testcase_14 AC 48 ms
63,372 KB
testcase_15 AC 46 ms
62,948 KB
testcase_16 AC 46 ms
63,340 KB
testcase_17 AC 52 ms
68,712 KB
testcase_18 AC 46 ms
62,944 KB
testcase_19 AC 48 ms
63,228 KB
testcase_20 AC 51 ms
67,124 KB
testcase_21 AC 56 ms
71,976 KB
testcase_22 AC 52 ms
67,816 KB
testcase_23 AC 48 ms
64,232 KB
testcase_24 AC 53 ms
69,100 KB
testcase_25 AC 48 ms
66,000 KB
testcase_26 AC 51 ms
68,604 KB
testcase_27 AC 46 ms
63,536 KB
testcase_28 AC 57 ms
73,428 KB
testcase_29 AC 50 ms
66,912 KB
testcase_30 AC 53 ms
69,296 KB
testcase_31 AC 58 ms
73,880 KB
testcase_32 AC 59 ms
73,868 KB
testcase_33 AC 59 ms
73,868 KB
testcase_34 AC 53 ms
70,516 KB
testcase_35 AC 59 ms
77,028 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")
elif cnt_n1 & 1:
	print("First")
else:
	print("First" if xorval else "Second")
0