CCF 门禁系统
来源:互联网 发布:mysql primary key 编辑:程序博客网 时间:2024/04/30 15:21
import java.util.Scanner;public class Main { public static void main(String[] args) { new Main().run(); } public void run(){ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int [] arr =new int[N]; int [] count=new int[N]; for(int i=0;i<N;i++){ arr[i]=sc.nextInt(); count[i]=1; for(int j=0;j<i;j++){ if(arr[j]==arr[i]){ count[i]++; } } System.out.print(count[i]+" "); } }}
注意内容:
两个循环很纠结。大脑需要变成计算机运行模式理解。
阅读全文
0 0
- CCF题目:门禁系统
- ccf试题 门禁系统
- CCF 门禁系统
- ccf认证门禁系统
- CCF 门禁系统
- CCF之门禁系统
- ccf 门禁系统
- CCF-门禁系统-201412-1
- CCF-门禁系统entrance guard
- CCF-201412-1 门禁系统
- CCF 201412-1 门禁系统
- CCF-201412-1-门禁系统
- CCF 201412-1 门禁系统
- CCF第一题--门禁系统
- ccf-201412-1 门禁系统
- ccf门禁系统201412-1
- CCF-201412-1-门禁系统
- 【ccf-201412-1】门禁系统
- linux多线程编程1
- intend启动系统的组件
- ubuntu16.04上samba服务器的安装和配置
- FZU 2252 Yu-Gi-Oh! (思维 枚举 贪心)
- Leetcode:122. Best Time to Buy and Sell Stock II
- CCF 门禁系统
- 简单认识Gradle这个构建工具
- 浅谈移动软件开发与电脑软件开发发展前景
- 关于分布式的平台设计的思考
- 10、不一样的C++系列--类的真正形态
- Ubuntu常用命令大全
- Poj-3253-Fence Repair ( 哈夫曼
- Kotlin开篇之基本语法
- JAVA_JAVA中的流程控制语句