#K1706. Nearest Interesting Number
Nearest Interesting Number
Nearest Interesting Number
We define an \(interesting\) number as a positive integer that does not contain the digit '7' in its decimal representation. Given an integer \(k\) (where \(1 \le k \le 10000\)), your task is to find the smallest \(interesting\) number that is greater than or equal to \(k\).
For example:
- If \(k = 70\), since 70 contains the digit '7', the next valid number is 80.
- If \(k = 123\), the number 123 is already interesting as it does not include the digit '7'.
Note: The task requires you to read the input from standard input (stdin) and output the result to standard output (stdout).
inputFormat
The input is a single integer \(k\) given via standard input (stdin).
Example:
70
outputFormat
Output the smallest interesting number that is greater than or equal to \(k\) to standard output (stdout).
Example:
80## sample
70
80