結果
問題 |
No.2937 Sigma Plus Problem
|
ユーザー |
|
提出日時 | 2024-10-09 11:29:48 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 58 ms / 300 ms |
コード長 | 369 bytes |
コンパイル時間 | 3,356 ms |
コンパイル使用メモリ | 242,792 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-09 11:29:53 |
合計ジャッジ時間 | 4,697 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ull = unsigned long long; int INF = 1000000000; int main(){ ull N; cin >> N; ull ans = 0; ull now = 0; ull check = 100; while(N >= check){ ans += now + 5050; now += 10000; check += 100; } for(ull j = check - 99;j <= N;j++)ans += j; cout << ans << endl; }