結果

問題 No.480 合計
ユーザー vjudge1
提出日時 2025-03-07 13:02:55
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 283 bytes
コンパイル時間 1,220 ms
コンパイル使用メモリ 77,584 KB
実行使用メモリ 8,608 KB
最終ジャッジ日時 2025-03-07 13:02:57
合計ジャッジ時間 1,781 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>

int main() {
    int x;
    std::cin >> x;

    // Define a lambda function to perform the calculation
    auto calculate = [](int x) {
        return x * (x + 1) / 2;
    };

    int result = calculate(x);
    std::cout << result << std::endl;

    return 0;
}
0