結果
問題 |
No.2937 Sigma Plus Problem
|
ユーザー |
|
提出日時 | 2024-10-22 16:37:39 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 252 bytes |
コンパイル時間 | 1,176 ms |
コンパイル使用メモリ | 65,172 KB |
最終ジャッジ日時 | 2025-02-24 22:17:29 |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 7 WA * 13 |
ソースコード
#include <iostream> #include <cstdint> using namespace std; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); uint64_t N; cin >> N; if (N & 1) cout << (N + 1) / 2 * N << '\n'; else cout << N / 2 * (N + 2) << '\n'; return 0; }