#include<iostream>using namespace std;
int main(){ int n,k,sum=0; while(cin>>n>>k){ sum=n; while(n>=k){ sum=sum+n/k; k=k*k; } cout<<sum<<endl; } return 0; }
為什麼錯了?