report VI VI EN
Register | Login
  • HOME
  • PROBLEMSET
  • ROADMAP
  • COMPETITION
  • TOPIC
  • RANKING
  • GUIDE
  • MASHUP
  • ABOUT
  • CONTACT
  • Problem
  • Submit
  • Results
k-th digit - MarisaOJ: Marisa Online Judge

k-th digit

Time limit: 1000 ms
Memory limit: 256 MB
Write down all positive integers in ascending order in a row like this: `1234567891011121314...`. What is the $k^{th}$ digit? ### Input - The first line an integer $k$. ### Output - Print the $k^{th}$ digit. ### Constraints - $1 \le k \le 10^{18}$. ### Example Input: ``` 14 ``` Output: ``` 1 ```
Binary search on answer
Reading
Minimum maximum
Beautiful number
Multiplication table
k-th digit
Maximum mean
Birthday
Sorting the differences
Collecting
Topic
Binary search
Rating 1000
Solution (1) Solution