728x90
반응형

단순 사칙연산 문제이다.

N, M = map(int, input().split())
t = N
while N:
    N = N//M
    t += N
print(t)
728x90
반응형

+ Recent posts