목차

Electric Fence

ps
링크acmicpc.net/…
출처BOJ
문제 번호27123
문제명Electric Fence
레벨실버 2
분류

기하학

시간복잡도O(logn)
인풋사이즈n<=65536
사용한 언어Python 3.11
제출기록33376KB / 44ms
최고기록40ms
해결날짜2023/04/10

풀이

코드

"""Solution code for "BOJ 27123. Electric Fence".

- Problem link: https://www.acmicpc.net/problem/27123
- Solution link: http://www.teferi.net/ps/problems/boj/27123

Tags: [geometry] [pick's theorem]
"""


from teflib import geometry


def main():
    n, m, p = [int(x) for x in input().split()]
    interior_points, _ = geometry.lattice_point_in_polygon(
        [(0, 0), (n, m), (p, 0)]
    )
    print(interior_points)


if __name__ == '__main__':
    main()