結果
| 問題 |
No.8044 April Sum of Odd
|
| コンテスト | |
| ユーザー |
taki_g
|
| 提出日時 | 2019-04-01 21:08:32 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 63 ms / 2,000 ms |
| コード長 | 318 bytes |
| コンパイル時間 | 275 ms |
| コンパイル使用メモリ | 82,048 KB |
| 実行使用メモリ | 82,304 KB |
| 最終ジャッジ日時 | 2024-11-26 10:01:39 |
| 合計ジャッジ時間 | 1,404 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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