結果

問題 No.8044 April Sum of Odd
ユーザー kai yo
提出日時 2020-11-08 19:46:23
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 401 bytes
コンパイル時間 194 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 19,296 KB
最終ジャッジ日時 2024-07-22 15:39:41
合計ジャッジ時間 1,365 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 3 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

A = input().split()
B = input().split()

try:
    C = 0
    D = 0
    for x in range(int(A[0])):
        if 1 == int(B[x]) % 2:
            C = C + int(B[x])
            D = D + 1
        else:
            if C != 0 and D >= int(A[1]):
                    print(C)
                    C = 0
                    D = 0
    if C != 0 and D >= int(A[1]):
        print(C)
except IndexError:
    print("")
0