結果

問題 No.8044 April Sum of Odd
ユーザー もりを
提出日時 2019-04-01 21:33:24
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 238 bytes
コンパイル時間 140 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 21,732 KB
最終ジャッジ日時 2024-11-26 11:24:57
合計ジャッジ時間 1,243 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 3 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m = map(int,input().split())
a = list(map(int,input().split()))

res = 0
for i in a:
    if i % 2 == 0:
        if res > 0:
            print(res)
            res = 0
    else:
        res += i
else:
    if res != 0:
        print(res)
0