提交时间:2026-05-30 15:30:04
运行 ID: 442841
#include<bits/stdc++.h> using namespace std; int main(){ int m,k,s=0,d=0; cin>>m>>k; while(m>0){ d++; m--; s++; if (s==k){ m++; s=0; } } cout<<d; return 0; }