結果

問題 No.1849 Three Times Value
ユーザー sorag
提出日時 2022-09-27 16:20:46
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 10 ms / 2,000 ms
コード長 556 bytes
コンパイル時間 1,372 ms
コンパイル使用メモリ 110,780 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-22 16:59:23
合計ジャッジ時間 2,930 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include<utility>
#include <vector>
#include <map>
#include<string>
#include<queue>
#include<math.h>
#define pb push_back
#define all(x) begin(x),end(x)
#define gall(x) begin(x),end(x),greater<>()
#define ll long long
#define P pair<int,int>
#define lP pair<ll,ll>
#include <iostream>
#include <vector>
using namespace std;
int main() {
    ll n;
    cin>>n;
    int ans=0;
    for(int i=1;i<=100000;i++){
        string t=to_string(i);
        string s=t+t+t;
        if(n>=stoll(s)) ans++;
    }
    cout<<ans<<endl;
    return 0;
}
0