結果

問題 No.8044 April Sum of Odd
ユーザー harurun
提出日時 2021-03-12 17:33:46
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 96 ms / 2,000 ms
コード長 223 bytes
コンパイル時間 103 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 21,396 KB
最終ジャッジ日時 2024-10-14 04:45:00
合計ジャッジ時間 1,267 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M,*A=map(int,open(0).read().split())
s=0
b=False
l=0
for i in A:
  if i%2==0:
    if b:
      if l>=M:
        print(s)
      s=0
      l=0
      b=False
  else:
    s+=i
    l+=1
    b=True
if b:
  if l>=M:
    print(s)
0