結果

問題 No.3044 April Sum of Odd
ユーザー zutsuzutsu
提出日時 2022-05-12 20:53:00
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
WA  
実行時間 -
コード長 190 bytes
コンパイル時間 104 ms
コンパイル使用メモリ 10,492 KB
実行使用メモリ 18,956 KB
最終ジャッジ日時 2023-09-27 20:38:03
合計ジャッジ時間 1,569 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,884 KB
testcase_01 AC 15 ms
7,856 KB
testcase_02 AC 14 ms
7,824 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 55 ms
18,956 KB
testcase_11 AC 38 ms
9,960 KB
testcase_12 AC 14 ms
7,812 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M = map(int, input().split())
A = list(map(int, input().split()))

S = 0
for a in A:
    if a % 2 == 1:
        S += a
    else:
        if S > 0: print(S)
        S = 0
if S > 0: print(S)
0