Gunga doesn't like the number 7. Given a positive integer $$$x$$$, try to find the maximum integer smaller than $$$x$$$ that does not contain a 7 on any of its digits.
A single integer $$$x$$$ $$$(1\le x\le 10^4)$$$.
The maximum integer smaller than $$$x$$$ that does not contain a 7 on any of its digits.
8
6
777
699
In the first example, 6 is the maximum integer smaller than 8 that does not contain a 7 on any of its digits.