結果

問題 No.480 合計
ユーザー _yoshih_
提出日時 2018-09-17 21:32:25
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 310 bytes
コンパイル時間 441 ms
コンパイル使用メモリ 63,104 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-18 07:49:15
合計ジャッジ時間 1,090 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>

using namespace std;

static void setup()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
}

int main(int argc, char **argv)
{
    setup();
    int n;
    cin >> n;

    auto sum = 0;
    for (auto i = 1; i <= n; ++i) {
        sum += i;
    }

    cout << sum << endl;
    return 0;
}
0