Created
September 5, 2020 11:54
-
-
Save Svastikkka/078128ed227a3418bc3bc2493bc7a7ec to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def multiplyList(myList): | |
# Multiply elements one by one | |
result = 1 | |
for x in myList: | |
result = result * int(x) | |
return result | |
def solve(n): | |
c=0 | |
one="1" | |
zero="0" | |
for i in range(1,1000000): | |
if one not in list(str(i).strip()) and zero not in list(str(i).strip()): | |
arr=list(str(i).strip()) | |
if multiplyList(arr) == n: | |
c=c+1 | |
return c | |
n=int(input()) | |
print(solve(n)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Supernatural