wxc_1 @ 2022-12-04 12:33:07
using namespace std;
int main()
{
int n ,k;
cin >> n >> k;
int x=0,y=0,ans=n;
do
{
x = (n+y) / k;
y = n % k;
ans += x;
n = x;
}while(x);
cout << ans;
}
by lucky_loser @ 2022-12-04 12:55:30
你想一下,如果我输入10和2会发生什么
by wxc_1 @ 2022-12-04 18:25:12
@yty2011 改好了,谢了