mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-24 13:31:07 +00:00
60418a6fd7
intuitive solution using functional programming
9 lines
210 B
Python
9 lines
210 B
Python
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()
|