LCP 11. 期望个数统计
为保证权益,题目请参考 LCP 11. 期望个数统计(From LeetCode).
解决方案1
Python
python
# LCP 11. 期望个数统计
# https://leetcode-cn.com/problems/qi-wang-ge-shu-tong-ji/
from typing import List
class Solution:
def expectNumber(self, scores: List[int]) -> int:
return (len(set(scores)))
if __name__ == "__main__":
so = Solution()
print(so.expectNumber([1,1]))
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14