fork download
  1. import java.util.Scanner;
  2.  
  3. class Main
  4. {
  5. public static void main (String[] args) throws java.lang.Exception
  6. {
  7. Scanner input = new Scanner(System.in);
  8. int[] a = new int[4];
  9. for (int i = 0; i < 4; i++) {
  10. a[i] = input.nextInt();
  11. }
  12. input.close();
  13. System.out.println(a[0]*a[1]+a[2]*a[3]);
  14. }
  15. }
Success #stdin #stdout 0.13s 29580KB
stdin
1000 1000 1000 1000
stdout
2000000