#include <iostream>
using namespace std;
int main()
{
int ans,n,k,w;
cin>>n>>k>>w;
ans=n;
while(n/k!=0) {
ans=ans+(n/k)*w;
n=(n/k)*w;
}
cout<<ans<<endl;
return 0;
送出解答是NA 49%
想請問可以怎麼改???
餘數要加上去