`
linuke
  • 浏览: 10138 次
  • 性别: Icon_minigender_1
  • 来自: 随州
社区版块
存档分类
最新评论
文章列表
idea升级到15后mybatis_plus 2.456 不能用,用附件中的jar包替换插件安装后的jar即可。 不是真正的破解,是2.31替换jar包中的plugin.xml 。所以2.51中的新功能不能用,追求完美的处女座的不要用,等待真正的破解出来。
选择 License server 输入 http://idea.lanyus.com 点解 ok

第九题

public class Task_9 { /** * 已知现在有唯一的自然数三元组(a,b,c)满足: a≤b≤c 且 a2+b2=c2 且 a+b+c = 1000 求a×b×c的值。 * * @param args */ public static void main(String[] args) { for (int a = 1; a < 500; a++) { for (int b = 1; b < 500; b++) { if ((a * a + b * b) == (1000 - a - b) * (10 ...

第八题

public class Task_8 { /** * 给你1000个0至9中的自然数,问你最大的连续5个数的乘积是多少。 * @param args */ public static void main(String[] args) { String string = "78641346984696467976446749865164446456496346494643" + "36949320646022406404620404645020734712143061656962" + &qu ...
public class Task_7 { /** * 求第10001个素数的值。 * * @param args */ public static void main(String[] args) { int count = 10001; int num = 2; for(;;num++){ if(isPrime(num)){ count --; } if(count == 0){ System.out.println(num); break; } } } ...
public class Task_6 { /** * 求(1+2+…+100)²-(1²+2²+22²+…+100²) * @param args */ public static void main(String[] args) { int n = 100; int sum1 = 0; int sum2 = 0; for(;n >= 1;n --){ sum1 += n; sum2 += (n * n); } System.out.println(sum1*sum1 - sum2); } ...
public class Task_4 { /** * 求所有的两个三位数的乘积中,最大的回文数。 * @param args */ public static void main(String[] args) { int maxNumber = 0; for(int i = 999;i >= 100;i --){ for(int j = 999;j >= 100;j --){ if(isPlalindrome(i * j) && ((i*j)> maxNumber)){ ...
public class Task_5 { /** * 求能被1、2、……、20整除的最小的正整数。 * @param args */ public static void main(String[] args) { long j = 1; for (; j < 2147483647; j++) { for (int i = 1; i < 21; i++) { if (j % i != 0) { break; } else { if (i == 20) { System.out ...
Find the largest prime factor of a composite number. 求600851475143的最大质因数。 public class Task_3 { /** * 求600851475143的最大质因数。 * @param args */ public static void main(String[] args) { long num = 600851475143l; long factor=2l; while(num >1){ if(num%factor==0){ while(n ...
By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms. 求Fibonacci数列(1,2,3,5,8,……)中所有小于4000000的偶数的和。 public class Task_2 { /** * 求Fibonacci数列(1,2,3,5,8,……)中所有小于4000000的偶数的和。 * @param args */ public static voi ...
Add all the natural numbers below one thousand that are multiples of 3 or 5. 求所有小于1000且能被3或5整除的自然数的和。 public class Task_1 { /** * 求所有小于1000且能被3或5整除的自然数的和。 * @param args */ public static void main(String[] args) { System.out.println(sum1()); System.out.println(sum2()); } pub ...
欧拉项目ing
switch 和 if那个的效率高呀,
Global site tag (gtag.js) - Google Analytics