結果
| 問題 |
No.8044 April Sum of Odd
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-04-01 22:39:48 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 82 ms / 2,000 ms |
| コード長 | 243 bytes |
| コンパイル時間 | 82 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 21,480 KB |
| 最終ジャッジ日時 | 2024-11-27 03:31:49 |
| 合計ジャッジ時間 | 1,106 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
ソースコード
N, M = map(int, input().split())
A = list(map(int, input().split()))
s = 0
j = 0
for i in A:
if i % 2 == 0:
if j >= M:
print(s)
s = 0
j = 0
else:
s += i
j += 1
if j >= M:
print(s)