[프로그래머스/Python] 의상

2023. 9. 12. 23:56·Algorithm/Programmers

백준 '9375번, 패션왕 신해빈' 문제와 완전 똑같기 때문에 풀이도 똑같다.

해당 문제 풀이는 여기 참고!

 

def solution(clothes):
    closet = {}
    for cloth, type in clothes:
        if type not in closet:
            closet[type] = 1
        closet[type] += 1
    
    answer = 1
    for k, v in closet.items():
        answer *= v
    return answer - 1

 

'Algorithm > Programmers' 카테고리의 다른 글

[프로그래머스/Python] 구명보트  (0) 2023.09.21
[프로그래머스/Python] 베스트앨범  (0) 2023.09.13
[프로그래머스/Python] 전화번호 목록  (0) 2023.09.12
[프로그래머스/Python] 뒤에 있는 큰 수 찾기  (0) 2023.09.05
[프로그래머스/Python] 스택/큐  (0) 2023.09.05
'Algorithm/Programmers' 카테고리의 다른 글
  • [프로그래머스/Python] 구명보트
  • [프로그래머스/Python] 베스트앨범
  • [프로그래머스/Python] 전화번호 목록
  • [프로그래머스/Python] 뒤에 있는 큰 수 찾기
빵빵0
빵빵0
(아직은) 공부하고 정리하는 블로그입니다.
  • 빵빵0
    Hack Your World
    빵빵0
  • 전체
    오늘
    어제
    • 분류 전체보기 (92)
      • Error Handling (7)
      • Project (5)
        • MEV (2)
      • Architecture (0)
        • API (0)
        • Cache (0)
        • 사소한 고민거리 (0)
      • Computer Science (4)
        • Data Structure (2)
        • Database (1)
        • Cloud (0)
        • OS (0)
        • Infra, Network (1)
        • AI (0)
      • Language (8)
        • Go (8)
        • Rust (0)
        • Python (0)
        • Java (0)
      • Algorithm (40)
        • BaekJoon (18)
        • Programmers (7)
        • LeetCode (6)
        • NeetCode (9)
      • SW Books (9)
        • gRPC Up & Running (1)
        • System Design Interview (2)
        • 스프링 입문을 위한 자바 객체지향의 원리와 이해 (6)
        • 블록체인 해설서 (0)
        • 후니의 쉽게 쓴 CISCO 네트워킹 (0)
      • BlockChain (4)
        • Issues (0)
        • Research (4)
        • Tech (0)
      • Own (8)
        • TIR(Today I Read) (3)
        • Personal (2)
        • Novel (0)
        • Memo (3)
  • 블로그 메뉴

    • 홈
    • 태그
    • 방명록
  • 링크

  • 공지사항

  • 인기 글

  • 태그

    KBW
    큐
    Greedy
    BaekJoon
    MEV
    goroutine
    Hash Table
    블록체인
    candlechart
    golang
    2024
    ethereum
    BEAKJOON
    BFS
    DP
    Programmers
    EVM
    blockchain
    LeetCode
    go
    NeetCode
    백준
    스택
    프로그래머스
    chart
    context
    Palindrome
    MongoDB
    two pointer
    Python
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.4
빵빵0
[프로그래머스/Python] 의상
상단으로

티스토리툴바