보안을 그리다, 훈이

[Baekjoon/Python3] 18301번 Rats 본문

Programming/Python & Data Structures

[Baekjoon/Python3] 18301번 Rats

HooNeee 2020. 12. 8. 18:14

[Baekjoon/Python3] 18301번 Rats

 

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 math
n1, n2, n12 = map(int, input().split())
print(math.floor((n1 + 1) * (n2 + 1) / (n12 + 1) - 1))
Comments