結果

問題 No.111 あばばばば
ユーザー kuisiba
提出日時 2016-04-01 18:13:54
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 323 bytes
コンパイル時間 444 ms
コンパイル使用メモリ 60,476 KB
実行使用メモリ 814,228 KB
最終ジャッジ日時 2024-10-02 08:51:00
合計ジャッジ時間 2,754 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 2 WA * 1 MLE * 1 -- * 6
権限があれば一括ダウンロードができます

ソースコード

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