結果
問題 |
No.1208 anti primenumber game
|
ユーザー |
|
提出日時 | 2020-08-30 15:14:28 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 434 bytes |
コンパイル時間 | 935 ms |
コンパイル使用メモリ | 82,220 KB |
実行使用メモリ | 110,632 KB |
最終ジャッジ日時 | 2024-11-15 08:43:30 |
合計ジャッジ時間 | 5,141 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 39 WA * 5 |
ソースコード
N,M=map(int,input().split()) A=list(map(int,input().split()))[::-1] check=0 while A and A[-1]==1: A.pop() check+=1 if check%2==0: A=A[::-1] N=len(A) tmp=sum(A)-N+2*(1-M)*(2*A.count(1)-N) if tmp>0: print("First") else: print("Second") else: A=A[::-1] N=len(A) tmp=(1-M)-(sum(A)-N+2*(1-M)*(2*A.count(1)-N)) if tmp>0: print("First") else: print("Second")