摘要: for循环遍历查找: public class Main{ public static void main(String[] args) { Scanner sc=new Scanner(System.in); int n=sc.nextInt(); int[] arr = {3, 78, 9, 6 阅读全文
posted @ 2020-02-09 19:51 是馄饨呀 阅读(566) 评论(0) 推荐(0) 编辑
摘要: import java.util.Scanner; /* *计算杨辉三角: * 规律:两边都是1 * 从第三行开始,上一行的前一个元素+与其并排的元素等于下面的元素 * 例如: * 1 * 11 * 121 * 1331 * 14641 */ public class Main{ public st 阅读全文
posted @ 2020-02-09 15:15 是馄饨呀 阅读(258) 评论(0) 推荐(0) 编辑