結果
| 問題 | No.756 チャンパーノウン定数 (1) | 
| コンテスト | |
| ユーザー |  k82b | 
| 提出日時 | 2023-12-05 05:47:42 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 2,000 ms | 
| コード長 | 211 bytes | 
| コンパイル時間 | 1,969 ms | 
| コンパイル使用メモリ | 192,800 KB | 
| 最終ジャッジ日時 | 2025-02-18 07:46:00 | 
| ジャッジサーバーID (参考情報) | judge4 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 20 | 
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main(){
	int K;cin>>K;
	int n=9,w=1,s=0,a=0;
	while(n*w+s<K)s+=n*w,a+=n,n*=10,w++;
	int d=(K-s+w-1)/w;
	string str=to_string(a+d);
	cout<<str[(K-s-1)%w]<<"\n";
}
            
            
            
        