Python/project_euler/problem_08/sol1.py
2018-10-19 17:14:25 -05:00

16 lines
352 B
Python

import sys
def main():
LargestProduct = -sys.maxsize-1
number=raw_input().strip()
for i in range(len(number)-13):
product=1
for j in range(13):
product *= int(number[i+j])
if product > LargestProduct:
LargestProduct = product
print(LargestProduct)
if __name__ == '__main__':
main()