Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
Minimo quadrato somma di cubi
//'main' method must be in a class 'Rextester'. //Compiler version 1.8.0_111 import java.util.*; import java.lang.*; class Rextester { public static void main(String args[]) { int m; m=0; for(int n=4;n<=100;n++){ for(int a=2;a<=100;a++){ double y; y=0.0; y=0.25*(n*(2*a+n-1)*(2*Math.pow(a,2)+2*a*(n-1)+n*(n-1))); if ((Math.sqrt(y)==(int)Math.sqrt(y))) { if ((y<m) || (m==0)) m=(int)y; // System.out.println(y); } } } System.out.println(m); } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
susun
hello!
jb6.13 varargs
3f
Find Case Combinations of a String
Bubble Sort Java 2
Java
f
Assignment for Web Software Developer position
// Java Coding Challenge - 07: Print out Fibonacci number 0 - 1000
Please log in to post a comment.