結果
問題 |
No.2937 Sigma Plus Problem
|
ユーザー |
![]() |
提出日時 | 2025-02-18 00:19:48 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 611 bytes |
コンパイル時間 | 3,102 ms |
コンパイル使用メモリ | 273,336 KB |
実行使用メモリ | 13,636 KB |
最終ジャッジ日時 | 2025-02-18 00:19:59 |
合計ジャッジ時間 | 10,633 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 TLE * 1 |
other | AC * 6 TLE * 5 -- * 9 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll=long long; #define rep1(i,a) for(int i=0;i<(a);i++) #define rep2(i,a,b) for(int i=(a);i<(b);i++) #define rep3(i,a,b,c) for(int i=(a);((a)<=(b)?i<(b):i>(b));i+=(c)) #define rep_overload(a,b,c,d,e,...) e #define rep(...) rep_overload(__VA_ARGS__,rep3,rep2,rep1)(__VA_ARGS__) #define chmax(x,y) ((x)=max(x,y)) #define chmin(x,y) ((x)=min(x,y)) #define all(x) (x).begin(),(x).end() int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); uint64_t n,ans=0; cin >> n; rep(i,1,n+1){ ans+=i; } cout << ans << "\n"; }