Skip to content

Instantly share code, notes, and snippets.

@igorvanloo
Created July 23, 2021 11:14
Show Gist options
  • Select an option

  • Save igorvanloo/8ced87c194af22423b1eb094d5248136 to your computer and use it in GitHub Desktop.

Select an option

Save igorvanloo/8ced87c194af22423b1eb094d5248136 to your computer and use it in GitHub Desktop.
Problem 38
def compute():
checker = ['1', '2', '3', '4', '5', '6', '7', '8', '9']
concatenated_product_list = []
for z in range(2,10):
for x in range(1,10**math.floor(9/z)):
temp_str = ""
for y in range(1,z+1):
product = x*y
temp_str += str(product)
if sorted(temp_str) == checker:
concatenated_product_list.append(int(temp_str))
return max(concatenated_product_list), concatenated_product_list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment