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

Prime digit sum

Time limit: 1000 ms
Memory limit: 256 MB
Write down all positive numbers whose digit sum is a prime: $$2,3,5,7,11,12,14,16,...$$ What is the $k^{th}$ number? ### Input - A single line contains an integer $k$. ### Output - Print the $k^{th}$ number ### Constraints - $0 \le k \le 10^{12}$. ### Example Input: ``` 7 ``` Output: ``` 14 ```
Digit DP
Unlucky number
Digit Sum
Divisible
Prime digit sum
Non-palindrome number
Yet another XOR problem
Taboo substring
Balanced number
Equation
Beautiful number
Constructing numbers
Topic
Binary search
Dynamic Programming
Rating 1500
Solution (0) Solution