Skip to content

Commit a00f3ef

Browse files
committed
[Silver III] Title: 패션왕 신해빈, Time: 116 ms, Memory: 14500 KB -BaekjoonHub
1 parent 2ba3ccc commit a00f3ef

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

백준/Silver/9375. 패션왕 신해빈/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
### 성능 요약
66

7-
메모리: 14936 KB, 시간: 120 ms
7+
메모리: 14500 KB, 시간: 116 ms
88

99
### 분류
1010

1111
조합론, 자료 구조, 해시를 사용한 집합과 맵, 수학, 집합과 맵
1212

1313
### 제출 일자
1414

15-
2025년 5월 2일 01:47:20
15+
2025년 5월 2일 01:54:32
1616

1717
### 문제 설명
1818

백준/Silver/9375. 패션왕 신해빈/패션왕 신해빈.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ public static void main(String[] args) throws IOException{
1414
Map<String, Integer> clothes = new HashMap<>();
1515
int cnt = Integer.parseInt(br.readLine()); //의상 갯수
1616
for(int j=0; j<cnt; j++){
17-
String[] s = br.readLine().split(" ");
18-
clothes.put(s[1], clothes.getOrDefault(s[1],0)+1);
17+
// String[] s = br.readLine().split(" ");
18+
StringTokenizer st = new StringTokenizer(br.readLine()," ");
19+
st.nextToken(); //의상 이름은 필요없으므로 건너뜀
20+
String s = st.nextToken();
21+
clothes.put(s, clothes.getOrDefault(s,0)+1);
1922
}
2023

2124
int result = 1;

0 commit comments

Comments
 (0)