挂#3
查看原帖
挂#3
897858
NEXUSNOA楼主2024/4/2 20:24
#include<bits/stdc++.h>
using namespace std;
int n,k,s;
int main(){
	cin>>n>>k;
	s=n;
	while(n>k){
		s+=n/k;
		n=n%k+n/k;
	}
	cout<<s;
	return 0;
}
2024/4/2 20:24
加载中...