Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
59364 段文昊 14能吸多少根烟 C++ Accepted 4 MS 272 KB 167 2023-10-21 22:17:07

Tests(10/10):


Code:

#include <iostream> using namespace std; int main() { int a,b,c,d; cin>>a>>b; d=a; while(a>=b) { c=a/b; a=c+a%b; d+=c; } cout<<d; return 0; }