結果
| 問題 | No.1208 anti primenumber game |
| コンテスト | |
| ユーザー |
gew1fw
|
| 提出日時 | 2025-06-12 12:48:55 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 646 bytes |
| コンパイル時間 | 208 ms |
| コンパイル使用メモリ | 82,276 KB |
| 実行使用メモリ | 119,416 KB |
| 最終ジャッジ日時 | 2025-06-12 12:49:12 |
| 合計ジャッジ時間 | 5,047 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 31 WA * 13 |
ソースコード
def main():
import sys
input = sys.stdin.read().split()
N = int(input[0])
M = int(input[1])
A = list(map(int, input[2:2+N]))
total = 0
for i in range(N):
a = A[i]
if a == 0:
d = 0
elif a == 1:
d = 1 - M
else:
if M == 0:
d = a
else:
d = a - 2 + M
if (i % 2) == 0: # 1-based index i+1 is odd (0-based even)
total += d
else:
total -= d
if total > 0:
print("First")
else:
print("Second")
if __name__ == "__main__":
main()
gew1fw