Python/project_euler/problem_08/sol1.py

16 lines
348 B
Python
Raw Normal View History

2018-10-19 12:48:28 +00:00
import sys
def main():
LargestProduct = -sys.maxsize-1
2018-10-20 19:45:08 +00:00
number=input().strip()
for i in range(len(number)-12):
2018-10-19 12:48:28 +00:00
product=1
for j in range(13):
product *= int(number[i+j])
if product > LargestProduct:
LargestProduct = product
print(LargestProduct)
if __name__ == '__main__':
main()