結果
| 問題 | No.8044 April Sum of Odd |
| コンテスト | |
| ユーザー |
iNoma87976671
|
| 提出日時 | 2019-04-01 22:31:49 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 58 ms / 2,000 ms |
| + 124µs | |
| コード長 | 425 bytes |
| 記録 | |
| コンパイル時間 | 56 ms |
| コンパイル使用メモリ | 15,104 KB |
| 実行使用メモリ | 21,872 KB |
| 最終ジャッジ日時 | 2026-09-30 15:23:46 |
| 合計ジャッジ時間 | 1,872 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
ソースコード
N,M = map(int,input().split())
s = list(map(int,input().split()))
ans = []
sum_s = 0
counter = 0
for A in s:
if A %2 == 1:
counter += 1
sum_s += A
isOdd = True
else:
if counter >= M:
ans.append(sum_s)
sum_s = 0
isOdd = False
counter = 0
if isOdd:
if counter >= M:
ans.append(sum_s)
for i in ans:
if i != 0:
print(i)
iNoma87976671