2017年12月3日
摘要: public class Wg { public static void main(String[] args) { int[] arr = new int[100]; arr[0] = 0; arr[1] = 1; arr[2] = 2; arr[3] = 3; for(int i=4;i<arr 阅读全文
posted @ 2017-12-03 22:08 acaca 阅读(187) 评论(0) 推荐(0) 编辑
摘要: public class Dx { public static void main(String[] args) { String str="hdDEjsS"; System.out.println(dXx(str)); } public static String dXx(String str){ 阅读全文
posted @ 2017-12-03 20:40 acaca 阅读(290) 评论(0) 推荐(0) 编辑
摘要: public class Demo01 { public static void main(String[] args) { // TODO Auto-generated method stub for(int i=100;i<=1000;i++){ if(isShuiXianHua(i)){ Sy 阅读全文
posted @ 2017-12-03 20:27 acaca 阅读(451) 评论(0) 推荐(0) 编辑
摘要: 三角形 public class Dc { public static void main(String[] args) { int n =10; for(int i=0;i<n;i++){ for(int j=0;j<=n-i;j++){ System.out.print(" "); } for( 阅读全文
posted @ 2017-12-03 20:16 acaca 阅读(308) 评论(0) 推荐(0) 编辑
  2017年12月1日
摘要: 描述 假设你有一个各位数字互不相同的四位数,把所有的数字从大到小排序后得到a,从小到大后得到b,然后用a-b替换原来这个数,并且继续操作。例如,从1234出发,依次可以得到4321-1234=3087、8730-378=8352、8532-2358=6174,又回到了它自己!现在要你写一个程序来判断 阅读全文
posted @ 2017-12-01 21:01 acaca 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 描述 大家都知道阶乘这个概念,举个简单的例子:5!=1*2*3*4*5.现在我们引入一种新的阶乘概念,将原来的每个数相乘变为i不大于n的所有奇数相乘例如:5!!=1*3*5.现在明白现在这种阶乘的意思了吧! 现在你的任务是求出1!!+2!!......+n!!的正确值(n<=20) 输入 第一行输入 阅读全文
posted @ 2017-12-01 21:00 acaca 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 描述相传韩信才智过人,从不直接清点自己军队的人数,只要让士兵先后以三人一排、五人一排、七人一排地变换队形,而他每次只掠一眼队伍的排尾就知道总人数了。输入3个非负整数a,b,c ,表示每种队形排尾的人数(a<3,b<5,c<7),输出总人数的最小值(或报告无解)。已知总人数不小于10,不超过100 。 阅读全文
posted @ 2017-12-01 20:58 acaca 阅读(223) 评论(0) 推荐(1) 编辑
摘要: .toLowerCase();//转成小写.toUpperCase();//转成大写 例: String str = "aaaaaBBcccc";String Upstr = str.toUpperCase(); String Lowstr = str.toLowerCase(); Upstr 的值 阅读全文
posted @ 2017-12-01 20:49 acaca 阅读(47918) 评论(0) 推荐(0) 编辑
  2017年11月29日
摘要: public class Test4 { public static void main(String[] args) { func7(); } public static void func7(){ String[] str = {"Allen","Smith","James","Martin", 阅读全文
posted @ 2017-11-29 15:01 acaca 阅读(179) 评论(0) 推荐(0) 编辑
摘要: public class Test4 { public static void main(String[] args) { med(); } public static void med(){ int[] a ={1,2,3,4,5,0}; int count = 0; for(int i=0;i< 阅读全文
posted @ 2017-11-29 14:44 acaca 阅读(849) 评论(0) 推荐(0) 编辑