#P1150. Peter 的烟
Peter 的烟
Description
Peter has cigarettes. Each time he finishes a cigarette, he keeps the butt. () butts can be exchanged for one new cigarette. How many cigarettes can Peter smoke in total?
Unlike some brain teasers, Peter cannot borrow cigarette butts from another dimension and return them after smoking.
Input Format
Each test case consists of one line containing two integers ().
Output Format
For each test case, output one line containing one integer, the total number of cigarettes.
4 3
5
10 3
14
Hint
For of the testdata, .
Translated by ChatGPT 5
京公网安备 11011102002149号