結果
問題 |
No.3120 Lower Nim
|
ユーザー |
|
提出日時 | 2025-04-24 14:44:45 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 537 bytes |
コンパイル時間 | 409 ms |
コンパイル使用メモリ | 11,904 KB |
実行使用メモリ | 35,060 KB |
最終ジャッジ日時 | 2025-04-24 14:44:53 |
合計ジャッジ時間 | 7,138 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 1 |
other | TLE * 1 -- * 42 |
ソースコード
#!/usr/bin/env python3 import sys def main(): data = sys.stdin.read().split() if not data: return it = iter(data) N = int(next(it)) # 整数列 A をちょうど N 個だけ読み込む(改行や余分な空白にも強い) A = [int(next(it)) for _ in range(N)] total_xor = 0 for a in A: total_xor ^= a # XOR が 0 なら Second(後攻必勝)、そうでなければ First(先攻必勝) print("First" if total_xor else "Second") if __name__ == "__main__": main()