結果

問題 No.480 合計
ユーザー アシツノカラアシツノカラ
提出日時 2023-04-27 20:24:07
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 2,086 bytes
コンパイル時間 4,210 ms
コンパイル使用メモリ 262,408 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-28 10:46:25
合計ジャッジ時間 4,524 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,816 KB
testcase_01 AC 1 ms
6,944 KB
testcase_02 AC 2 ms
6,940 KB
testcase_03 AC 1 ms
6,944 KB
testcase_04 AC 1 ms
6,944 KB
testcase_05 AC 2 ms
6,940 KB
testcase_06 AC 1 ms
6,940 KB
testcase_07 AC 1 ms
6,944 KB
testcase_08 AC 1 ms
6,944 KB
testcase_09 AC 2 ms
6,944 KB
testcase_10 AC 2 ms
6,944 KB
testcase_11 AC 2 ms
6,944 KB
testcase_12 AC 2 ms
6,944 KB
testcase_13 AC 2 ms
6,944 KB
testcase_14 AC 1 ms
6,940 KB
testcase_15 AC 1 ms
6,944 KB
testcase_16 AC 2 ms
6,940 KB
testcase_17 AC 2 ms
6,940 KB
testcase_18 AC 2 ms
6,944 KB
testcase_19 AC 2 ms
6,940 KB
testcase_20 AC 1 ms
6,944 KB
testcase_21 AC 2 ms
6,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

#if __has_include(<atcoder/all>)
    #include <atcoder/all>
    using namespace atcoder;
    // using mint = modint998244353;
    // using mint = modint1000000007;
    // using mint = modint;
#endif

using namespace std;
using ll = long long;

constexpr char nl = '\n';
constexpr long long INF64 = 9223372036854775807;
constexpr double PI = 3.14159265358979;

#define rep(i, a, n) for(long long i = (long long)(a); i < (long long)(n); ++i)
#define rrep(i, n, a) for(long long i = (long long)(n) - 1; (long long)(a) <= i; --i)
#define all(a) std::begin(a), std::end(a)
#define rall(a) std::rbegin(a), std::rend(a)
#define Sort(a) sort(std::begin(a), std::end(a))
#define rsort(a) sort(std::rbegin(a), std::rend(a))

#ifdef LOCAL
    #include <my_debug_print.hpp>
    #define debug(...) print_normal_for_debug(#__VA_ARGS__, __VA_ARGS__)
    #define debug_rank(...) print_format_for_debug(#__VA_ARGS__, __VA_ARGS__)
    #define debug_println(...) debug_println(__VA_ARGS__)
    #define debug_print(...) debug_print(__VA_ARGS__)
#else
    #define debug(...) (static_cast<void>(0))
    #define debug_rank(...) (static_cast<void>(0))
    #define debug_println(...) (static_cast<void>(0))
    #define debug_print(...) (static_cast<void>(0))
#endif


template <typename T>
void print(const T &arg) {
    std::cout << arg;
}

template <typename T, typename... U>
void print(const T &arg, const U&... args) {
    std::cout << arg;
    print(args...);
}

long long solve1() {
    long long N;
    cin >> N;
    debug(N);
    print(((N + 1) * N) / 2 , nl);
    return 0LL;
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    std::cout << std::fixed << std::setprecision(15);

    {
        long long times = 1LL;
        for (long long _index = 1LL; _index <= times; ++_index) {
            debug_println("--------------------------------", _index, "---------------------------------", '\n');
            solve1();
            debug_println("------------------------------------------------------------------", '\n');
        }
    }
    return 0;
}
0