{"problem":{"name":"C. Quick coffee","description":{"content":"Let's say we would like to give change of $d$ dollars after a puchase of coffee. The only coins that we can use have values $a$, $a + 1$, ..., $b$. Is it possible to give out the change? We are intere","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10241C"},"statements":[{"statement_type":"Markdown","content":"Let's say we would like to give change of $d$ dollars after a puchase of coffee. The only coins that we can use have values $a$, $a + 1$, ..., $b$. Is it possible to give out the change? We are interested in even harder quesion: for given $d$ and $a$ what is the smallest $b$ such that the change can be given?\n\nThe input is two numbers $1 <= a <= d <= 10^9$.\n\nPrint smallest $b$ such that $d$ is a sum of coins from range $a,..., b$.\n\n## Input\n\nThe input is two numbers $1 <= a <= d <= 10^9$.\n\n## Output\n\nPrint smallest $b$ such that $d$ is a sum of coins from range $a,..., b$.\n\n[samples]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ t \\in \\mathbb{Z} $ be the number of test cases.  \nFor each test case $ k \\in \\{1, \\dots, t\\} $, let $ n_k \\in \\mathbb{Z} $ be the target value.  \nInitial state: $ a = 1 $, $ x = 0 $.  \n\n**Operations**  \nIn one operation, choose one of:  \n1. $ x \\leftarrow x + a $  \n2. $ a \\leftarrow x $, then $ x \\leftarrow x + a $  \n\n**Objective**  \nFor each $ n_k $, find the minimum number of operations to reach $ x = n_k $.","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10241C","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}