求助大佬80分

P1150 Peter 的烟

litianlin @ 2022-07-14 11:55:56

#include<bits/stdc++.h>
#include<iostream>
using namespace std;
int main()
{
    int k,n,n2,k2;
    cin>>n>>k;
    n2=n/k+n;
    cout<<n2; 
    return 0;
}

大佬帮忙看一下


by LiaoYF @ 2022-07-14 11:57:06

@litianlin (n-1)/(k-1)


by litianlin @ 2022-07-15 11:01:42

@Mr_LiaoYifan 谢谢大佬,已通过


|