Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | |||||
| 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| 10 | 11 | 12 | 13 | 14 | 15 | 16 |
| 17 | 18 | 19 | 20 | 21 | 22 | 23 |
| 24 | 25 | 26 | 27 | 28 | 29 | 30 |
| 31 |
Tags
- 알고리즘
- 건강
- BFS
- 시뮬레이션
- greedy
- 운동기록
- binary search
- 프로그래머스
- Java
- 백준
- 러닝일지
- math
- 문자열
- DP
- 투포인터
- 코테
- SQL
- dfs
- priorityqueue
- COS PRO
- BOJ
- 이분탐색
- 코딩테스트
- 자바
- oracle
- 문제해결
- db
- SWEA
- 문제풀이
- MySQL
Archives
- Today
- Total
슈콩
[프로그래머스] Lv.2 의상 본문


[문제]
https://school.programmers.co.kr/learn/courses/30/lessons/42578
프로그래머스
SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프
programmers.co.kr
[소스 코드]
import java.util.*;
class Solution {
public int solution(String[][] clothes) {
int answer = 1;
Map<String,Integer> hm = new HashMap<>();
for(String[] s : clothes){
hm.put(s[1],hm.getOrDefault(s[1],1)+1);
}
for(int i : hm.values()){
answer *= i;
}
return answer-1;
}
}'Algorithms > Programmers' 카테고리의 다른 글
| [프로그래머스] Lv.2 기능개발 (0) | 2025.10.15 |
|---|---|
| [프로그래머스] Lv.2 피로도 (0) | 2025.10.15 |
| [프로그래머스] Lv.2 괄호 회전하기 (0) | 2025.10.14 |
| [프로그래머스] Lv.2 할인 행사 (0) | 2025.10.14 |
| [프로그래머스] Lv.2 연속 부분 수열 합의 개수 (0) | 2025.10.14 |