Run ID:146137

提交时间:2026-01-26 23:02:22

n,k=map(int,input().split()) total=n while n>=k: m=n//k n = (n % k) + m total+=m print(total)