結果

問題 No.1849 Three Times Value
ユーザー れいん
提出日時 2024-12-09 14:00:56
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 11 ms / 2,000 ms
コード長 346 bytes
コンパイル時間 3,180 ms
コンパイル使用メモリ 245,316 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-09 14:01:01
合計ジャッジ時間 4,933 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main()
{
    long long N;
    cin >> N;
    int ans = 0;
    for (int i = 1; i <= 99999; i++)
    {
        string S;
        for (int j = 0; j < 3; j++)
        {
            S += to_string(i);
        }
        if (stoll(S) <= N)
        {
            ans++;
        }
    }
    cout << ans;
}
0