Competitive Programming Solutions

GitHub
back to dashboard

D. Difference

Codeforces - Sheet #1 (Data type - Conditions) · limit: 1s · memory: 256MB · view on codeforces

input

1 2 3 4

output

Difference = -10
Main.java
static void solve() {

        // Write your solution here
        long a = in.nextLong();
        long b = in.nextLong();
        long c = in.nextLong();
        long d = in.nextLong();
        out.println("Difference = " + ((a * b) - (c * d)));
    }