Agorithm/백준 알고리즘
백준 알고리즘 4619번 루트(python)
kimjinho1
2021. 2. 23. 00:14
728x90
반응형
단순 수학 문제이다.
while 1:
B, N = map(int, input().split())
if B == N == 0:
break
i = 0
while i**N < B:
i += 1
print(i if i**N-B < B-(i-1)**N else i-1)
728x90
반응형