結果

問題 No.480 合計
ユーザー bolero
提出日時 2025-01-24 22:29:48
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 1,189 bytes
コンパイル時間 5,250 ms
コンパイル使用メモリ 331,916 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2025-01-24 22:29:54
合計ジャッジ時間 6,448 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#include <atcoder/all>

// 可変引数repマクロ https://trap.jp/post/1224/
#define rep1(a) for (long long i = 0; i < a; i++)
#define rep2(i, a) for (long long i = 0; i < a; i++)
#define rep3(i, a, b) for (long long i = a; i < b; i++)
#define rep4(i, a, b, c) for (long long i = a; i < b; i += c)
#define overload4(a, b, c, d, e, ...) e
#define rep(...) overload4(__VA_ARGS__, rep4, rep3, rep2, rep1)(__VA_ARGS__)

#define printYesNo(is_ok) puts(is_ok ? "Yes" : "No");
#define ALL(v) v.begin(), v.end();
#define RALL(v) v.rbegin(), v.rend();
#define SORT(v) sort(ALL(v));
#define RSORT(v) sort(RALL(v));
#define REVERSE(v) reverse(ALL(v));

template <class T>
using pq_asc = priority_queue<T, vector<T>, greater<T>>;
template <class T>
using pq_des = priority_queue<T>;

template <typename T>
void printlnVector(T v)
{
  for (auto n : v)
  {
    cout << n << endl;
  }
}

template <typename T>
void printVector(T v)
{
  for (auto n : v)
  {
    cout << n << " ";
  }
  cout << endl;
}

int main()
{
  int N;
  cin >> N;

  atcoder::modint1000000007 ans = 0;
  rep(i, N)
  {
    ans += i + 1;
  }

  cout << ans.val() << endl;

  return 0;
}
0