Agorithm/백준 알고리즘

백준 알고리즘 2875번 대회 or 인턴(python)

kimjinho1 2021. 2. 12. 01:42
728x90
반응형

단순 수학 문제이다.

N, M, K = map(int, input().split())
for _ in range(K):
    if N//2 < M:
        M -= 1
    else:
        N -= 1
print(min(N//2, M))
728x90
반응형