https://school.programmers.co.kr/learn/courses/30/lessons/42576
# sort 이용
def solution(participant, completion):
answer = 0
participant.sort()
completion.sort()
for i,j in zip(participant,completion):
if i != j:
break
answer +=1
return (participant[answer])
# 해시 이용
from collections import defaultdict
def solution(participant, completion):
answer = 0
tmp_dic = defaultdict(int)
# 참가자 이름을 키값으로 동명이인 포함하여 인원 수를 value값으로 dict에 저장
for i in participant:
tmp_dic[i] += 1
# 완주자 이름을 키값으로 찾아서 value를 1을 뺀다.
# (단, value값이 0이 되면 동명이인이 없는 것이므로 tmp_dic에서 제거)
for i in completion:
tmp_dic[i] -= 1
if tmp_dic[i] == 0:
del tmp_dic[i]
return list(tmp_dic)[0]
[defaultdict 라이브러리]
https://velog.io/@jsanga214/%EB%94%95%EC%85%94%EB%84%88%EB%A6%AC-%ED%95%B4%EA%B2%B0-%EB%B0%A9%EC%95%88
Really unquie place, Thank you so much meant for posting The experience. Fantasticly penned report, anxieties most of folks given similar volume of material as you may, the online market place might be a a lot better put. Be sure to keep it up! haha178 Daftar
Wonderful blog post, resolved to go on and even bookmarked your webblog. As i can’t hold on to enjoy a book alot more as a result of one. IPTV UK
Le meilleur serveur IPTV Smarters Pro se distingue par sa stabilité, sa rapidité et sa qualité de streaming en haute définition. Il garantit une connexion sans coupures, avec un temps de latence minimal, pour une expérience utilisateur optimale. Ce serveur offre un large choix de chaînes TV, films et séries, adaptés aux besoins des utilisateurs. Compatible avec plusieurs appareils, il assure une diffusion fluide et sécurisée, permettant de profiter pleinement du contenu IPTV via Smarters Pro, en toute simplicité et fiabilité. Meilleur serveur IPTV Smarters Pro
Now i'm actually very happy to locate this web site and also would take pleasure in studying beneficial posts published the following. The particular tips with the creator has been great, thank you for your discuss. https://gatesofolympus2slot.com