結果

問題 No.480 合計
ユーザー kotorigasatori
提出日時 2019-04-15 09:39:10
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 315 bytes
コンパイル時間 505 ms
コンパイル使用メモリ 66,532 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-22 05:40:25
合計ジャッジ時間 1,247 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#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