結果
問題 | No.3044 よくあるカエルさん |
ユーザー |
![]() |
提出日時 | 2025-03-31 17:34:07 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 688 bytes |
コンパイル時間 | 185 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 65,664 KB |
最終ジャッジ日時 | 2025-03-31 17:34:56 |
合計ジャッジ時間 | 2,526 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 1 |
other | RE * 20 |
ソースコード
n, m = map(int, input().split())a = list(map(int, input().split()))current_start = Nonecurrent_sum = 0result = []for i in range(n):if a[i] % 2 == 1:if current_start is None:current_start = icurrent_sum = a[i]else:current_sum += a[i]else:if current_start is not None:length = i - current_startif length >= m:result.append(current_sum)current_start = Nonecurrent_sum = 0# Check the last runif current_start is not None:length = n - current_startif length >= m:result.append(current_sum)for s in result:print(s)