結果

問題 No.111 あばばばば
ユーザー kuisibakuisiba
提出日時 2016-04-01 18:13:54
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 323 bytes
コンパイル時間 454 ms
コンパイル使用メモリ 59,972 KB
実行使用メモリ 814,732 KB
最終ジャッジ日時 2024-04-10 07:08:55
合計ジャッジ時間 2,589 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,812 KB
testcase_01 AC 1 ms
6,940 KB
testcase_02 WA -
testcase_03 MLE -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>

using namespace std;

int main() {
    int l;
    cin >> l;
    int count{};
    vector<int> v;
    for (int i = 2; i <= l; ++i) {
        if (i % 2 == 1) v.push_back(i);
    }
    for (auto elem : v) {
        count += (l - elem +1);
    }
    cout << count << endl;
    return 0;
}
0