๋ฐ์ํ
import java.util.Scanner;
public class FindTheCount {
// 10807 ๊ฐ์ ์ธ๊ธฐ
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[] nArr = new int[n];
int count = 0;
for (int i=0; i<n; i++) {
nArr[i] = sc.nextInt();
}
int v = sc.nextInt();
sc.close();
for (int a : nArr) {
if (a == v)
count++;
}
System.out.print(count);
}
}
๋ฐ์ํ
'๐ธ Algorithm > ๐ธ ๋ฐฑ์ค BaekJoon' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[๋ฐฑ์ค][java][10818][์ต์, ์ต๋] (0) | 2023.10.15 |
---|---|
[๋ฐฑ์ค][java][10871][X๋ณด๋ค ์์ ์] (0) | 2023.10.15 |
[๋ฐฑ์ค][java][10951][A+B - 4] (0) | 2023.10.09 |
[๋ฐฑ์ค][java][10952][A+B - 5] (0) | 2023.10.09 |
[๋ฐฑ์ค][java][2439][๋ณ ์ฐ๊ธฐ - 2] (0) | 2023.10.09 |