結果
問題 | No.8044 April Sum of Odd |
ユーザー |
|
提出日時 | 2019-04-01 21:30:53 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 85 ms / 2,000 ms |
コード長 | 279 bytes |
コンパイル時間 | 155 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 14,868 KB |
最終ジャッジ日時 | 2024-11-26 11:17:08 |
合計ジャッジ時間 | 1,010 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
N, M = map(int, raw_input().split())A = map(int, raw_input().split())cnt = 0tmp = 0for i in xrange(N):if A[i] % 2 == 1:cnt += 1tmp += A[i]else:if cnt >= M:print tmpcnt = 0tmp = 0if cnt >= M:print tmp