結果
| 問題 | 
                            No.8044 April Sum of Odd
                             | 
                    
| コンテスト | |
| ユーザー | 
                             iNoma87976671
                         | 
                    
| 提出日時 | 2019-04-01 22:27:09 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 374 bytes | 
| コンパイル時間 | 108 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 21,616 KB | 
| 最終ジャッジ日時 | 2024-11-27 03:23:00 | 
| 合計ジャッジ時間 | 1,238 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | WA * 3 | 
| other | WA * 10 | 
ソースコード
N,M = map(int,input().split())
s = list(map(int,input().split()))
ans = []
sum_s = 0
counter = 0
for A in s:
    if A %2 == 1:
        counter+=1
        sum_s += A
        isOdd = True
    else:
        ans.append(sum)
        sum_s = 0
        isOdd = False
if isOdd:
    if counter >= M:
        ans.append(sum)
    sum_s = 0
for i in ans:
    if i != 0:
        print(i)
            
            
            
        
            
iNoma87976671