ymmyyy @ 2021-08-18 21:21:02
#include<cstdio>
#include<cstring>
#include<iostream>
using namespace std;
int n,m,j,k;
int main(){
cin>>n>>m;
j=n;
k=n;
while (j>m){
j=j-m;
k++;
j=j+1;
}
cout<<k;
return 0;
}
by 幽灵特工 @ 2021-08-18 21:24:14
@美团骑手—裕 你可以参考题解改改
by ymmyyy @ 2021-08-18 21:27:17
@幽灵特工 行
by phmaprostrate @ 2021-08-18 21:39:16
@美团骑手—裕 j >= m
by ymmyyy @ 2021-08-18 21:40:41
@phmaprostrate 对了,谢谢