Competitive Programming Solutions

GitHub
back to dashboard

Y. The last 2 digits

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

input

5 7 2 4

output

80
Main.java
static void solve() {

        // Write your solution here
        int a = in.nextInt();
        int b = in.nextInt();
        int c = in.nextInt();
        int d = in.nextInt();
        a %= 100;
        b %= 100;
        c %= 100;
        d %= 100;
        int val = (a * b * c * d) % 100;
        out.printf("%02d\n", val);

    }