Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
107382 陈铎文 14能吸多少根烟 C++ Accepted 1 MS 276 KB 208 2025-01-17 16:04:03

Tests(10/10):


Code:

#include<iostream> using namespace std; int main(){ int k,n,s=0,m=0; cin>>n>>k; while(n){ s+=n; m+=n; n=m/k; m=m%k; } cout<<s; return 0; }