Created
December 11, 2012 22:26
-
-
Save jamak/4262902 to your computer and use it in GitHub Desktop.
This file contains 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
from string import whitespace | |
from operator import mul | |
data = open('number.dat') # Number pasted to file. | |
digits = [int(c) for line in data for c in line if c not in whitespace] | |
print max([reduce(mul, digits[i:i+5]) for i in range(len(digits)-5)]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment