Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Min Quadrato
//'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
javajava
recursion_java
add2
susun
Shortest distance between words
Variables&Types
Leetcode 17. Letter Combinations of a Phone Number
Memory cleanup
Kochergina_1
Two Sum in Sorted input array