結果
問題 |
No.1208 anti primenumber game
|
ユーザー |
![]() |
提出日時 | 2025-06-12 17:58:19 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 615 bytes |
コンパイル時間 | 315 ms |
コンパイル使用メモリ | 82,976 KB |
実行使用メモリ | 109,312 KB |
最終ジャッジ日時 | 2025-06-12 17:58:48 |
合計ジャッジ時間 | 5,333 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 33 WA * 11 |
ソースコード
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])) if M > 1: total = 0 for a in A: if a == 1: total += (1 - M) else: total += (a - 2 + M) print("First" if total > 0 else "Second") else: total = 0 sign = 1 for a in A: contribution = (a - M) * sign total += contribution sign *= -1 print("First" if total > 0 else "Second") if __name__ == "__main__": main()