Skip to content

Instantly share code, notes, and snippets.

@Svastikkka
Created September 5, 2020 11:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Svastikkka/078128ed227a3418bc3bc2493bc7a7ec to your computer and use it in GitHub Desktop.
Save Svastikkka/078128ed227a3418bc3bc2493bc7a7ec to your computer and use it in GitHub Desktop.
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))
@Svastikkka
Copy link
Author

Supernatural

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment