Created
July 23, 2021 11:14
-
-
Save igorvanloo/8ced87c194af22423b1eb094d5248136 to your computer and use it in GitHub Desktop.
Problem 38
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 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