📝 문제
🔓 답안
import java.io.*;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
String jinho = br.readLine();
int N = Integer.parseInt(br.readLine());
int count = 0;
for(int i = 0; i < N; i++){
if(br.readLine().equals(jinho))
count++;
}
bw.write(count + "\n");
bw.flush();
bw.close();
}
}
🖤 알고리즘 분류
- 구현
- 문자열
'PS > Baekjoon' 카테고리의 다른 글
[Baekjoon] 11051 - 이항 계수 2 (0) | 2023.05.23 |
---|---|
[Baekjoon] 11945 - 뜨거운 붕어빵 (0) | 2023.05.22 |
[Baekjoon] 10808 - 알파벳 개수 (0) | 2023.05.20 |
[Baekjoon] 1934 - 최소공배수 (0) | 2023.05.19 |
[Baekjoon] 24445 - 알고리즘 수업 - 너비 우선 탐색 2 (0) | 2023.03.31 |
댓글