#include<iostream>
using namespace std;
int main()
{
int a, b, temp = 0;
int total = 0;
cin >> a >> b;
total += a;
while (a >= b)
{
total += a / b;
a = a / b + a%b;
}
cout << total;
return 0;
}
CodeForces-379A-New Year Candles
最新推荐文章于 2022-02-13 16:10:44 发布