-
[브론즈 Ⅴ] 18301번 :: Rats / Java백준/브론즈 2022. 4. 28. 16:27
문제
https://www.acmicpc.net/problem/18301
18301번: Rats
To celebrate the Lunar New Year of the Rat, Douglas decides to count the number of rats living in his area. It is impossible for him to find all rats, as they tend to be well hidden. However, on the first day of the new year, Douglas manages to capture n1
www.acmicpc.net
코드
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n1 = scan.nextInt(); int n2 = scan.nextInt(); int n12 = scan.nextInt(); scan.close(); System.out.println((n1 + 1)*(n2 + 1)/(n12 + 1) - 1); } }
썸네일 '백준 > 브론즈' 카테고리의 다른 글
[브론즈 Ⅴ] 20492번 :: 세금 / Java (0) 2022.04.28 [브론즈 Ⅴ] 20254번 :: Site Score / Java (0) 2022.04.28 [브론즈 Ⅴ] 18108번 :: 1998년생인 내가 태국에서는 2541년생?! / Java (0) 2022.04.28 [브론즈 Ⅴ] 17496번 :: 스타후르츠 / Java (0) 2022.04.28 [브론즈 Ⅴ] 17256번 :: 달달함이 넘쳐흘러 / Java (0) 2022.04.27