# Process
# 1. Input clothes [[name, kind]...]
# 2. Make dictionary {kind, count_clothes}
# 3. Get sum of multiplication of (count_clothes + 1)
# 4. Return (sum - 1) for subtract wearing nothing
def solution(clothes):
dictClothes = {}
for i in range(0, len(clothes)):
if clothes[i][1] in dictClothes:
dictClothes[clothes[i][1]] += 1
else:
dictClothes[clothes[i][1]] = 1
mul = 1
for value in dictClothes.values():
mul *= (value + 1)
return mul - 1
해시 01 - 완주하지 못한 선수, 프로그래머스, 알고리즘, Programmers, Hash, 코딩테스트, Algorithm, 풀이
간만에 쌓인 것들 다시 업로드를.. # 참가자의 각 이름과 이름이 몇번 나왔는지를 확인해서 해시를 만들고, # 완주자로 위의 해시의 카운트를 빼서 없애준다. # 남은 참가자가 있으면 그 자가 범
itdar.tistory.com
2020/10/07 - [Life/Item review] - Lenovo 레노보 씽크패드 Thinkpad 빨콩 무선키보드/블루투스/울트라나브2/트랙키보드 구매 후기
Lenovo 레노보 씽크패드 Thinkpad 빨콩 무선키보드/블루투스/울트라나브2/트랙키보드 구매 후기
빨콩 + 키감 + 무선 울트라나브2 를 기다리다가 최근 나왔길래 고민안하고 샀다. -> 가격 13만 5천원 내외였던 것 같은데 음.. 가성비는 그닥 -> 빨콩 예전 x1 이후에 간만에 빨콩을 쓰니 손이 잘 안
itdar.tistory.com