import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int[] mat = new int[1001];// 最多仅仅有1000个,浪费1个
int temp = 0, count = 0;
while (sc.hasNext()) {
int n = sc.nextInt();
if (n == 0) {
return;
}
for (int i = 1; i <= n; i++) {
mat[i] = sc.nextInt();
}
temp = sc.nextInt();
count = 0;
for (int i = 1; i <= n; i++) {
if (temp == mat[i]) {
count++;
}
}
System.out.println(count);
}
}
}
hdu 1235 统计同成绩学生人数
import java.util.Scanner;public class Main {public static void main(String[] args) {Scanner sc = new Scanner(System.in);int[] mat = new int[1001];// 最多仅仅有1000个,浪费1个int temp = ...
·
转载于:https://www.cnblogs.com/jhcelue/p/6920806.html
昇腾计算产业是基于昇腾系列(HUAWEI Ascend)处理器和基础软件构建的全栈 AI计算基础设施、行业应用及服务,https://devpress.csdn.net/organization/setting/general/146749包括昇腾系列处理器、系列硬件、CANN、AI计算框架、应用使能、开发工具链、管理运维工具、行业应用及服务等全产业链
更多推荐



所有评论(0)