8000 Create [해시] 폰켓몬 jamin.py #1 · jaminleee/algorithm-study@3a2219d · GitHub
[go: up one dir, main page]

Skip to content

Commit 3a2219d

Browse files
committed
Create [해시] 폰켓몬 jamin.py da-in#1
1 parent f6e081d commit 3a2219d

File tree

1 file changed

+9
-0
lines changed
  • Programmers - 고득점 Kit/[해시] 폰켓몬

1 file changed

+9
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
def solution(nums):
2+
hash = {}
3+
4+
for i in nums:
5+
hash[i] = 1
6+
7+
if len(hash) > len(nums)//2 :
8+
return len(nums)//2
9+
return len(hash)

0 commit comments

Comments
 (0)
0