Skip to content

Commit dee62c7

Browse files
575_Distribute_Candies.py
1 parent 156d0a2 commit dee62c7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

575_Distribute_Candies.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
class Solution:
2+
def distributeCandies(self, candies):
3+
"""
4+
:type candies: List[int]
5+
:rtype: int
6+
"""
7+
return min(len(candies)//2, len(set(candies)))
8+

0 commit comments

Comments
 (0)