Advertisement
1nikitas

FIXTEH_5

Aug 31st, 2019
416
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.78 KB | None | 0 0
  1. package sketch;
  2.  
  3. public class n5{
  4.     public static void main(String[] args) {
  5.  
  6.  
  7.         /*
  8.         double n = Math.sqrt(a*(a+11)) + Math.sqrt(b*(b+11));
  9.         double m = Math.sqrt(a*b) + Math.sqrt((a+11)*(b+11));
  10.         */
  11.  
  12.  
  13.         for (int i = 0; i <= 10000000; i++){
  14.  
  15.             int a = 500;
  16.  
  17.             for (int j = 0; j<= 10000000; j++){
  18.  
  19.                 int b = 500;
  20.  
  21.                 double n = Math.sqrt(a*(a+11)) + Math.sqrt(b*(b+11));
  22.                 double m = Math.sqrt(a*b) + Math.sqrt((a+11)*(b+11));
  23.  
  24.                 if (n>=m){
  25.  
  26.                     System.out.println(a);
  27.                     System.out.println(b);
  28.  
  29.                 }else{
  30.                     b++;
  31.                 }
  32.             }
  33.  
  34.             a++;
  35.         }
  36.  
  37.  
  38.  
  39.     }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement