Problem Statement | |||||||||||||
In order to sharpen their basic arithmetic skills, kids often try to represent numbers using match sticks. As one is only given a limited number, one student is curious how high he can count with his matches.
Each one digit number is represented as follows: - number 8 uses seven matches. - numbers 0, 6 and 9 each use six matches. - numbers 2, 3 and 5 each use five matches. - numbers 4 and 7 each use four matches. - number 1 uses two matches. Given an int n denoting the number of matches he has at his disposal, return the smallest positive integer that cannot be represented. | |||||||||||||
Definition | |||||||||||||
| |||||||||||||
Constraints | |||||||||||||
- | n is between 1 and 128, inclusive. | ||||||||||||
Examples | |||||||||||||
0) | |||||||||||||
| |||||||||||||
1) | |||||||||||||
| |||||||||||||
2) | |||||||||||||
| |||||||||||||
3) | |||||||||||||
| |||||||||||||
4) | |||||||||||||
|