結果

問題 No.756 チャンパーノウン定数 (1)
ユーザー beet
提出日時 2018-12-05 16:31:28
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 22 ms / 2,000 ms
コード長 445 bytes
コンパイル時間 1,836 ms
コンパイル使用メモリ 194,544 KB
最終ジャッジ日時 2025-01-06 18:17:56
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
using Int = long long;
template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b) a=b;}
template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b) a=b;}

//INSERT ABOVE HERE
signed main(){
  Int d;
  cin>>d;
  for(Int i=0;;i++){
    string s=to_string(i);
    if((Int)s.size()<=d){
      d-=s.size();
      continue;
    }
    cout<<s[d]<<endl;
    break;
  }
  return 0;
}
0