結果

問題 No.2937 Sigma Plus Problem
ユーザー yuusaan
提出日時 2024-10-09 11:28:09
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
TLE  
実行時間 -
コード長 362 bytes
コンパイル時間 3,271 ms
コンパイル使用メモリ 242,004 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-09 11:28:19
合計ジャッジ時間 9,445 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 TLE * 1
other AC * 12 TLE * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#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 = 10;
    while(N >= check){
        ans += now + 55;
        now += 100;
        check += 10;
    }
    for(ull j = check - 9;j <= N;j++)ans += j;
    cout << ans << endl;
}
0