結果

問題 No.3044 April Sum of Odd
ユーザー tomarint2tomarint2
提出日時 2019-04-01 21:26:51
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 252 bytes
コンパイル時間 710 ms
コンパイル使用メモリ 86,732 KB
実行使用メモリ 90,608 KB
最終ジャッジ日時 2023-08-17 14:09:00
合計ジャッジ時間 1,991 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
71,296 KB
testcase_01 AC 67 ms
71,336 KB
testcase_02 AC 68 ms
71,124 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 92 ms
90,608 KB
testcase_11 AC 86 ms
88,912 KB
testcase_12 AC 67 ms
71,360 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M=map(int,input().split())
A=list(map(int,input().split()))
ans=[]
a1=0
for a in A:
    if a%2==1:
        a1+=a
    else:
        if a1!=0:
            ans.append(a1)
            a1=0
if a1!=0:
    ans.append(a1)
    a1=0
for a in ans:
    print(a)
0