| The Andover Computing Open (TACO) 2022 |
|---|
| Закончено |
Michael is grocery shopping and must give the cashier at least $$$N$$$ $$$(1\le N\le 10^9)$$$ dollars (if he exceeds his total, his cashier will simply give him the appropriate amount of change). However, Michael does not like the digits 2 and 7, so he does not want to pay an amount wherein any digits are multiples by 2 or 7 (notice that 0 is a multiple of any number!). Find the smallest number where this is possible.
The first line contains an integer $$$N$$$, the minimum amount of dollars Michael will pay.
A single line containing the smallest number that satisfies the constraint.
2
3
70
91
777777777
911111111
| Название |
|---|


