結果
問題 | No.3044 よくあるカエルさん |
ユーザー |
![]() |
提出日時 | 2025-03-26 15:45:17 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 462 bytes |
コンパイル時間 | 273 ms |
コンパイル使用メモリ | 82,068 KB |
実行使用メモリ | 54,440 KB |
最終ジャッジ日時 | 2025-03-26 15:45:39 |
合計ジャッジ時間 | 1,936 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 |
other | WA * 20 |
ソースコード
n, m = map(int, input().split())a = list(map(int, input().split()))result = []current_sum = 0current_length = 0for num in a:if num % 2 == 1:current_sum += numcurrent_length += 1else:if current_length >= m:result.append(current_sum)current_sum = 0current_length = 0# Check the last run after loop endsif current_length >= m:result.append(current_sum)for s in result:print(s)