From 09069942e8c84f47a9693abb8661aa84ccb062b2 Mon Sep 17 00:00:00 2001 From: huisuu Date: Thu, 22 Aug 2024 21:18:59 +0900 Subject: [PATCH] 34.py --- HSKIM/31to40/34.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 HSKIM/31to40/34.py diff --git a/HSKIM/31to40/34.py b/HSKIM/31to40/34.py new file mode 100644 index 0000000..47abeb7 --- /dev/null +++ b/HSKIM/31to40/34.py @@ -0,0 +1,11 @@ +def solution(nums): + answer = 0 + size = len(nums) // 2 + pokemon = set(nums) + + answer = min(size, len(pokemon)) + + return answer + +nums = [3,1,2,3] +print(solution(nums)) \ No newline at end of file