結果
問題 | No.8044 April Sum of Odd |
ユーザー |
![]() |
提出日時 | 2019-04-01 21:30:12 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 66 ms / 2,000 ms |
コード長 | 296 bytes |
コンパイル時間 | 358 ms |
コンパイル使用メモリ | 82,284 KB |
実行使用メモリ | 82,304 KB |
最終ジャッジ日時 | 2024-11-26 11:15:25 |
合計ジャッジ時間 | 1,566 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
N,M=map(int,input().split()) A=list(map(int,input().split())) ans=[] a1=0 cnt=0 for a in A: if a%2==1: a1+=a cnt+=1 else: if a1!=0 and cnt>=M: ans.append(a1) a1=0 cnt=0 if a1!=0 and cnt>=M: ans.append(a1) for a in ans: print(a)