結果

問題 No.1849 Three Times Value
ユーザー SSRS
提出日時 2022-02-24 20:01:05
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 14 ms / 2,000 ms
コード長 244 bytes
コンパイル時間 2,036 ms
コンパイル使用メモリ 194,504 KB
最終ジャッジ日時 2025-01-28 01:36:52
ジャッジサーバーID
(参考情報)
judge4 / 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 = to_string(i);
    if (stoll(S + S + S) <= N){
      ans++;
    }
  }
  cout << ans << endl;
}
0