#abc336c. C - Even Digits
C - Even Digits
Score: points
问题描述
一个非负整数 被称为好整数,当它满足以下条件时:
- 在 的十进制表示中,所有数字都是偶数(, , , , 和 )。
例如,、 和 都是好整数。
给定一个整数 ,请找出第 小的好整数。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
A non-negative integer is called a good integer when it satisfies the following condition:
- All digits in the decimal notation of are even numbers (, , , , and ).
For example, , , and are good integers.
You are given an integer . Find the -th smallest good integer.
Constraints
- is an integer.
Input
The input is given from Standard Input in the following format:
Output
Print the -th smallest good integer.
Sample Input 1
8
Sample Output 1
24
The good integers in ascending order are .
The eighth smallest is , which should be printed.
Sample Input 2
133
Sample Output 2
2024
Sample Input 3
31415926535
Sample Output 3
2006628868244228
update @ 2024/3/10 01:25:04