Skip to content

Commit 8e83300

Browse files
committed
LeetCode: 1431 solved
1 parent e93bc4c commit 8e83300

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# https://leetcode.com/problems/kids-with-the-greatest-number-of-candies/submissions/
2+
3+
class Solution:
4+
def kidsWithCandies(self, candies: [int], extraCandies: int) -> [bool]:
5+
maxCandies = max(candies, default=0)
6+
return [True if v + extraCandies >= maxCandies else False for v in candies]

0 commit comments

Comments
 (0)