Skip to content

Commit 51f75d5

Browse files
committed
2020-07-07
1 parent 39d0f69 commit 51f75d5

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
class Solution(object):
2+
def divingBoard(self, shorter, longer, k):
3+
"""
4+
:type shorter: int
5+
:type longer: int
6+
:type k: int
7+
:rtype: List[int]
8+
"""
9+
res = set()
10+
for i in range(k + 1):
11+
res.add(shorter * i + longer * (k - i))
12+
return sorted(list(res)) if k else []

0 commit comments

Comments
 (0)