본문 바로가기
Beakjoon&프로그래머스/Java

[백준/Java] 18301번 Rats

by 현장 2022. 4. 14.

-Code

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int n1 = scanner.nextInt();
        int n2 = scanner.nextInt();
        int n3 = scanner.nextInt();

        System.out.println((n1 + 1) * (n2 + 1) / (n3 + 1) - 1);
    }
}