fork download
  1.  
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. // your code goes here
  13. //For finding the minimum sum of two arrays
  14. int a1=2,a2=3; // Strictly increasing (ascending)
  15. int b1 =7,b2=5; // descending
  16.  
  17.  
  18. int d = (a1-a2)*(b1-b2);
  19.  
  20. //Shortcut for d = (a4-a2)(b2-b4) >=0
  21.  
  22. System.out.println(d);
  23. }
  24. }
  25.  
Success #stdin #stdout 0.09s 54620KB
stdin
Standard input is empty
stdout
-2