fork download
  1. import java.util.Scanner;
  2.  
  3. public class Main {
  4. public static void main(String[] args) {
  5. Scanner scanner = new Scanner(System.in);
  6.  
  7. long A = scanner.nextInt();
  8. long B = scanner.nextInt();
  9. long C = scanner.nextInt();
  10. long D = scanner.nextInt();
  11.  
  12. long Difference = (A*B)-(C*D);
  13.  
  14.  
  15. System.out.print("Difference = "+Difference);
  16. scanner.close();
  17.  
  18.  
  19. }
  20. }
  21.  
Success #stdin #stdout 0.21s 56884KB
stdin
23
54
12
14
stdout
Difference = 1074