Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- w, h, n = map(int, input().split())
- left = 0
- right = max(w, h) * n
- while right - left > 1:
- m = (left + right) // 2
- if (m // w) * (m // h) < n:
- left = m
- else:
- right = m
- print(right)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement