結果

問題 No.480 合計
ユーザー flamestorm
提出日時 2020-06-19 08:58:19
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 650 bytes
コンパイル時間 819 ms
コンパイル使用メモリ 98,224 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-03 13:10:40
合計ジャッジ時間 1,607 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstring>
#include <fstream>
#include <iostream>
#include <iomanip>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <string>
#include <queue>
#include <unordered_map>
#include <unordered_set>
#include <vector>

using namespace std;

const int MAX = 1000;
const int MOD = 1000000007;

void solve() {
    long long n;
    cin >> n;
    cout << (n*n+n)/2;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    //int tt; cin >> tt; for (int i = 1; i <= tt; i++) {solve(); cout << endl;}
    solve();
}
0