Run ID:146134

提交时间:2026-01-26 22:10:45

n,k=map(int,input().split()) t=n b=n while b>=k: new=b//k t+=new b=(b%k)+new print(t)