結果

問題 No.1208 anti primenumber game
ユーザー nasubi24
提出日時 2020-08-30 13:36:51
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 470 bytes
コンパイル時間 373 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 33,736 KB
最終ジャッジ日時 2024-11-15 06:52:07
合計ジャッジ時間 8,409 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 34 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m=map(int,input().split())
a=list(map(int,input().split()))
cnt=0
num1=0
num2=0
ans=0
for i in range(n):
    num1=ans
    num2=0
    if a[i]==1:
        if cnt==0:
            num1-=m-1
            cnt=1
        else:
            num2-=m-1
            cnt=0
    else:
        if cnt==0:
            num1+=a[i]-1
            num2-=m-1
        else:
            num2+=a[i]-1
            num1-=m-1
    ans=num1-num2
if ans>0:
    print("First")
else:
    print("Second")
0