Skip to content

Commit ceebb5f

Browse files
committed
Do daily
1 parent f4bb604 commit ceebb5f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

my-submissions/e2873.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
class Solution:
2+
def maximumTripletValue(self, nums: List[int]) -> int:
3+
return max([
4+
(u - v) * w for i, u in enumerate(nums[:-2])
5+
for j, v in enumerate(nums[i + 1:-1], i + 1)
6+
for k, w in enumerate(nums[j + 1:], j + 1)] + [0]
7+
)

0 commit comments

Comments
 (0)