結果
| 問題 | No.8044 April Sum of Odd |
| コンテスト | |
| ユーザー |
taki_g
|
| 提出日時 | 2019-04-01 21:08:32 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 44 ms / 2,000 ms |
| コード長 | 318 bytes |
| 記録 | |
| コンパイル時間 | 146 ms |
| コンパイル使用メモリ | 85,120 KB |
| 実行使用メモリ | 82,560 KB |
| 最終ジャッジ日時 | 2026-05-20 20:13:33 |
| 合計ジャッジ時間 | 1,497 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
ソースコード
N,M = map(int,input().split())
A = list(map(int,input().split()))
ans = []
count = 0
add = 0
for a in A:
if a%2==0:
if count >= M:
ans.append(add)
count = 0
add = 0
else:
count += 1
add += a
if count >= M:
ans.append(add)
for i in ans:
print(i)
taki_g