結果
| 問題 | 
                            No.8044 April Sum of Odd
                             | 
                    
| コンテスト | |
| ユーザー | 
                             tomarint2
                         | 
                    
| 提出日時 | 2019-04-01 21:26:51 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 252 bytes | 
| コンパイル時間 | 177 ms | 
| コンパイル使用メモリ | 82,176 KB | 
| 実行使用メモリ | 82,432 KB | 
| 最終ジャッジ日時 | 2024-11-26 11:03:23 | 
| 合計ジャッジ時間 | 1,384 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 3 WA * 7 | 
ソースコード
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)
            
            
            
        
            
tomarint2