結果

問題 No.480 合計
コンテスト
ユーザー kotorigasatori
提出日時 2019-04-15 09:39:10
言語 C++11
(gcc 15.3.0 + boost 1.92.0)
コンパイル:
g++-15 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 1 ms / 2,000 ms
+ 327µs
コード長 315 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 354 ms
コンパイル使用メモリ 91,888 KB
実行使用メモリ 9,780 KB
最終ジャッジ日時 2026-09-02 05:27:50
合計ジャッジ時間 1,828 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include<iostream>
#include<algorithm>
#include<vector>
#include<cmath>
#include<string>
#include<numeric>
#include<algorithm>
using namespace std;
int main()
{
    vector <int> a;
    int n;
    cin >> n;
    for(int i=0;i<=n;i++)a.push_back(i);
    cout << accumulate(a.begin(),a.end(),0) <<endl;
}
0