Skip to content

Instantly share code, notes, and snippets.

@IKKO-Ohta
Last active July 4, 2017 16:05
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 IKKO-Ohta/a002d1b5d50c7b0414afb8dd56b76e98 to your computer and use it in GitHub Desktop.
Save IKKO-Ohta/a002d1b5d50c7b0414afb8dd56b76e98 to your computer and use it in GitHub Desktop.
N = int(input())
gold = sum([i*j for i in range(1,10) for j in range(1,10)])
prod = N-gold
res = []
for i in range(1,10):
if prod % i == 0:
factor = (i,prod//i)
if factor[0]<=9 and factor[1]<=9: res.append(factor)
print(res)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment