bmdoctor @ 2024-09-10 22:54:23
看了很多大佬的代码,但是都看不懂(汗水),自己试了好多次也是过了,可以看看我这个小白的代码
#include<stdio.h>
#include<math.h>
int c,s,o,d;
int main()
{
scanf("%d %d",&c,&s);
d = floor((c - 1)/(s - 1));
o = c + d;
printf("%d",o);
return 0;
}
by mengfancheng @ 2024-09-10 23:51:42
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n,k;
cin>>n>>k;
n--;
k--;
cout<<n+n/k+1;
}
求关