結果
| 問題 |
No.8044 April Sum of Odd
|
| コンテスト | |
| ユーザー |
a
|
| 提出日時 | 2019-04-01 23:17:27 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 392 bytes |
| コンパイル時間 | 1,375 ms |
| コンパイル使用メモリ | 167,400 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-27 04:21:56 |
| 合計ジャッジ時間 | 2,083 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 2 WA * 8 |
ソースコード
#include "bits/stdc++.h"
using namespace std;
void solve()
{
long a, b, cur = 0, ser = 0;
cin >> a >> b;
while(a--)
{
long x;
cin >> x;
if (x & 1)
{
cur += x;
ser++;
}
else
{
if (ser >= b)
{
cout << cur << endl;
}
cur = 0;
}
}
if (ser >= b)
{
cout << cur << endl;
}
}
int main()
{
solve();
//cout << "yui(*-v・)yui" << endl;
return 0;
}
a