You are viewing a single comment's thread. Return to all comments →
Using Horner's method in the lamda to avoid the repeated calls to power function.
from functools import reduce input() print(reduce(lambda x, y: 2*x + y, sorted(map(int, input().split()))))
Seems like cookies are disabled on this browser, please enable them to open this website
Marc's Cakewalk
You are viewing a single comment's thread. Return to all comments →
Using Horner's method in the lamda to avoid the repeated calls to power function.