diff --git a/project_euler/problem_08/sol2.py b/project_euler/problem_08/sol2.py new file mode 100644 index 000000000..ae03f3ad0 --- /dev/null +++ b/project_euler/problem_08/sol2.py @@ -0,0 +1,8 @@ +from functools import reduce + +def main(): + number=input().strip() + print(max([reduce(lambda x,y: int(x)*int(y),number[i:i+13]) for i in range(len(number)-12)])) + +if __name__ == '__main__': + main()