Skip to content

Commit 744803a

Browse files
committed
Adding Problem_08
1 parent 1506ac9 commit 744803a

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Project Euler/Problem 08/sol1.py

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import sys
2+
def main():
3+
LargestProduct = -sys.maxsize-1
4+
number=input().strip()
5+
for i in range(len(number)-13):
6+
product=1
7+
for j in range(13):
8+
product *= int(number[i+j])
9+
if product > LargestProduct:
10+
LargestProduct = product
11+
print(LargestProduct)
12+
13+
14+
if __name__ == '__main__':
15+
main()

0 commit comments

Comments
 (0)