LikeAC @ 2020-02-07 13:18:31
#include<bits/stdc++.h>
using namespace std;
int n,k,sum,m;
int main()
{
cin>>n;
n+=sum;
while(n>=k)
{
m=n%k;
n/=k;
sum+=n;
n+=m;
}
cout<<sum;
return 0;
}
再次表示感谢
by LikeAC @ 2020-02-07 13:28:52
又是什么鬼
by LikeAC @ 2020-02-07 13:40:32
非常感谢各位大佬,后来我过了