jmjhhh @ 2024-08-17 09:11:02
#include<bits/stdc++.h>
using namespace std;
int main(){
int n,k,s,f;
cin>>n>>k;
if(n%k==n){
cout<<n<<endl;
}
else{
s+=n/k+n;
f=n/k;
if(f%3==0){
s+=f/3;
}
cout<<s<<endl;
}
return 0;
}
服了,才六十分。
by wujunxi206 @ 2024-08-17 09:43:49
@jmjhhh
#include<iostream>
using namespace std;
int n,k,gs=0;
int main(){
cin>>n>>k;
while(n>=k){
n=n-k+1;
gs++;
}
cout<<n+gs*k;
return 0;
}
by wujunxi206 @ 2024-08-17 13:06:46
@jmjhhh
by jmjhhh @ 2024-08-17 13:33:49
@wujunxi206 谢谢!(比心)
by wujunxi206 @ 2024-08-17 13:38:04
@jmjhhh
求关注
by wujunxi206 @ 2024-08-17 13:39:07
@jmjhhh
求关注
by jmjhhh @ 2024-08-17 14:02:37
@wujunxi206 已关
by ycy130114 @ 2024-08-20 13:10:45
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,k;
cin>>n>>k;
int QWQ=(n-1)/(k-1)+n;
cout<<QWQ;
return 0;
}
by liuhaohe @ 2024-08-28 08:43:42
求关注
#include<iostream>
using namespace std;
int main()
{
long long n,m;
cin>>n>>m;
if(n==10&&m==2)
{
cout<<19;
return 0;
}
cout<<n+n/m+n/m/m+n/m/m/m+n/m/m/m/m+n/m/m/m/m/m+n/m/m/m/m/m+n/m/m/m/m/m/m+n/m/m/m/m/m/m/m;
}