Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
6143 邓小龙 14能吸多少根烟 C++ Accepted 0 MS 272 KB 228 2025-01-10 16:55:53

Tests(10/10):


Code:

# include<iostream> using namespace std; int main(){ int n,k,d=0,cnt=0; cin>>n>>k; while(n){ n--; cnt++; d++; if(d==k){d=0,n++;} } cout<<cnt<<endl; return 0; }