結果
問題 |
No.3044 よくあるカエルさん
|
ユーザー |
![]() |
提出日時 | 2025-06-12 20:25:22 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 402 bytes |
コンパイル時間 | 249 ms |
コンパイル使用メモリ | 82,560 KB |
実行使用メモリ | 52,224 KB |
最終ジャッジ日時 | 2025-06-12 20:25:26 |
合計ジャッジ時間 | 1,891 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 |
other | WA * 20 |
ソースコード
n, m = map(int, input().split()) a = list(map(int, input().split())) current_run = [] sums = [] for num in a: if num % 2 == 1: current_run.append(num) else: if len(current_run) >= m: sums.append(sum(current_run)) current_run = [] # Check the last run after loop ends if len(current_run) >= m: sums.append(sum(current_run)) for s in sums: print(s)