結果
| 問題 |
No.8044 April Sum of Odd
|
| コンテスト | |
| ユーザー |
Valkyrja
|
| 提出日時 | 2020-05-19 00:51:29 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 105 ms / 2,000 ms |
| コード長 | 248 bytes |
| コンパイル時間 | 193 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 21,608 KB |
| 最終ジャッジ日時 | 2024-10-01 22:21:44 |
| 合計ジャッジ時間 | 1,709 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
ソースコード
n,m=[int(j) for j in input().split()]
a=[int(j) for j in input().split()]
cnt=0
tmp=0
for i in a:
if i%2==1:
cnt+=1
tmp+=i
else:
if cnt>=m:
print(tmp)
cnt=0
tmp=0
if cnt>=m:
print(tmp)
Valkyrja