結果
| 問題 | 
                            No.1208 anti primenumber game
                             | 
                    
| コンテスト | |
| ユーザー | 
                             lam6er
                         | 
                    
| 提出日時 | 2025-04-15 22:03:48 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 645 bytes | 
| コンパイル時間 | 353 ms | 
| コンパイル使用メモリ | 81,632 KB | 
| 実行使用メモリ | 107,812 KB | 
| 最終ジャッジ日時 | 2025-04-15 22:05:00 | 
| 合計ジャッジ時間 | 4,966 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 33 WA * 11 | 
ソースコード
n, m = map(int, input().split())
a = list(map(int, input().split()))
current_turn = True  # True for First player's turn
total = 0
for num in a:
    if num == 0:
        continue
    elif num == 1:
        diff = (1 - m) if current_turn else -(1 - m)
        total += diff
        current_turn = not current_turn
    else:
        if m <= 1:
            diff_val = num - m
        else:
            diff_val = num - 2 + m
        if current_turn:
            total += diff_val
        else:
            total -= diff_val
        if m <= 1:
            current_turn = not current_turn
if total > 0:
    print("First")
else:
    print("Second")
            
            
            
        
            
lam6er