#abc333c. C - Repunit Trio
C - Repunit Trio
Score : points
问题陈述
在十进制表示中,一个repunit是指所有数字均为 的整数。按升序排列的repunit序列如下:。
找出第 个恰好可以用三个repunit之和表示的最小整数。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
A repunit is an integer whose digits are all in decimal representation. The repunits in ascending order are .
Find the -th smallest integer that can be expressed as the sum of exactly three repunits.
Constraints
- is an integer between and , inclusive.
Input
The input is given from Standard Input in the following format:
Output
Print the answer.
Sample Input 1
5
Sample Output 1
113
The integers that can be expressed as the sum of exactly three repunits are in ascending order. For example, can be expressed as .
Note that the three repunits do not have to be distinct.
Sample Input 2
19
Sample Output 2
2333
Sample Input 3
333
Sample Output 3
112222222233
update @ 2024/3/10 01:19:28