摘要:
public class Re{ //定义一个main方法 public static void main(String[] args){ //将没有阻碍的路以1代替 int[][]maze={ {1,1,1}, {0,0,1}, {1,1,1} }; int[][]path= new int[3] 阅读全文
posted @ 2025-05-08 14:12
胖豆芽
阅读(1)
评论(0)
推荐(0)
摘要:
写程序需要 先找到计算公式,第一天的量=(第二天的量+1)*2;x_n=(x_(n+1)+1)*2 再转换为代码 //公共类 public class Re{ //定义一个main方法 public static void main(String[] args){ //new一个对象 T t=new 阅读全文
posted @ 2025-05-07 19:00
胖豆芽
阅读(6)
评论(0)
推荐(0)
摘要:
public class Re{ //定义一个main方法 //n=1时是1 //n=2时是1 //n=3时是2 //n=4时是3 //n=5时是5 //n=6时是8 public static void main(String[] args){ //new一个对象 Fibo f=new Fibo( 阅读全文
posted @ 2025-05-07 16:14
胖豆芽
阅读(1)
评论(0)
推荐(0)
摘要:
思路分析 1!=1 2!=1!*2 3!=2!*3 n!=(n-1)!*n 核心代码 定义方法 getR(int n) 方法体中 return getR(n-1)*n //公共类 public class Re{ //定义一个main方法 public static void main(String 阅读全文
posted @ 2025-05-06 19:41
胖豆芽
阅读(1)
评论(0)
推荐(0)
摘要:
//公共类 public class reC{ //定义一个main方法 public static void main(String[] args){ //new一个对象 T t=new T(); //调用对象的方法 t.test(5); } } //自定义类 class T{ //定义一个方法 阅读全文
posted @ 2025-05-06 19:09
胖豆芽
阅读(1)
评论(0)
推荐(0)
摘要:
public class getRes{ //定义一个main方法 public static void main(String[] args){ int [][]arr={{1,2,3},{4,5,6}}; //创建对像 MyTools tw=new MyTools(); tw.getRes(ar 阅读全文
posted @ 2025-05-06 17:27
胖豆芽
阅读(4)
评论(0)
推荐(0)
摘要:
public class getRes{ //定义一个main方法 public static void main(String[] args){ //创建对像 Change c=new Change(); Person p=new Person(); //调用方法 //Scanner myScan 阅读全文
posted @ 2025-05-06 15:44
胖豆芽
阅读(2)
评论(0)
推荐(0)
摘要:
public class getRes{ //定义一个main方法 public static void main(String[] args){ //创建对像 AA a=new AA(); //调用方法 //Scanner myScanner = new Scanner(System.in); / 阅读全文
posted @ 2025-05-06 14:51
胖豆芽
阅读(2)
评论(0)
推荐(0)
摘要:
阅读全文
posted @ 2025-05-06 14:17
胖豆芽
阅读(2)
评论(0)
推荐(0)
摘要:
//公共类 public class getRes{ //定义一个main方法 public static void main(String[] args){ //创建对像 AA a=new AA(); //调用方法 //Scanner myScanner = new Scanner(System. 阅读全文
posted @ 2025-05-06 13:57
胖豆芽
阅读(2)
评论(0)
推荐(0)