結果

問題 No.3044 April Sum of Odd
ユーザー ibukitiibukiti
提出日時 2021-10-05 17:38:32
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 230 bytes
コンパイル時間 85 ms
コンパイル使用メモリ 10,620 KB
実行使用メモリ 18,928 KB
最終ジャッジ日時 2023-09-30 08:32:55
合計ジャッジ時間 1,498 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,928 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 18 ms
8,616 KB
testcase_04 AC 20 ms
8,932 KB
testcase_05 AC 20 ms
8,772 KB
testcase_06 AC 20 ms
9,168 KB
testcase_07 AC 17 ms
8,328 KB
testcase_08 AC 18 ms
8,688 KB
testcase_09 AC 20 ms
9,044 KB
testcase_10 WA -
testcase_11 AC 54 ms
9,872 KB
testcase_12 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m=map(int,input().split())
a=list(map(int,input().split()))
ans=0
tmp=0
for i in a:
    if i%2!=0:
        ans+=i
        tmp+=1
    elif i%2==0:
        if tmp>=m:
            print(ans)
        ans=0
        tmp=0    
        
0