帮帮孩子吧!!!TLE!!!
查看原帖
帮帮孩子吧!!!TLE!!!
1345014
yhl123456666楼主2024/8/1 11:17
#include<bits/stdc++.h>
using namespace std;
int main(){
	int n,k,c,f;
	cin>>n>>k;
	while(n!=1){
		n--;
		c++;
		f++;
		if(f=k){
			n++;
			f==0;
		}
	}
	cout<<c;
	return 0;
}
2024/8/1 11:17
加载中...