{"problem":{"name":"170. Cooldown","description":{"content":"Every morning after you get out of bed, you brew yourself a nice cup of coffee to get yourself ready for the day. However, most of the time when you pick up the coffee to drink, it's too hot for you t","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10269170"},"statements":[{"statement_type":"Markdown","content":"Every morning after you get out of bed, you brew yourself a nice cup of coffee to get yourself ready for the day. However, most of the time when you pick up the coffee to drink, it's too hot for you to drink! You know that Newton's Formula of Cooling is $T (t) = T_s + (T_0 -T_s) e^(-k t)$, where:\n\n$T (t)$ is the temperature of the coffee at time $t$,\n\n$T_s$ is the ambient temperature of the room,\n\n$T_0$ is the initial temperature of the coffee, and\n\n$k$ is the decay constant.\n\nYou also know that the coffee reaches your favorable heat from a initial temperature of 210 degrees to 120 degrees after 15 minutes of cooling, in a room temperature of 70 degrees.\n\nThe first line of input will be an integer $n$, which denotes the amount of test cases to follow in the subsequent lines. The test cases will contain a positive integer $T (t)$, the temperature at time $t$.\n\nFor each test case, output the time $t$ minutes it takes for the freshly brewed coffee to cool town to temperature $T (t)$.\n\n## Input\n\nThe first line of input will be an integer $n$, which denotes the amount of test cases to follow in the subsequent lines. The test cases will contain a positive integer $T (t)$, the temperature at time $t$.\n\n## Output\n\nFor each test case, output the time $t$ minutes it takes for the freshly brewed coffee to cool town to temperature $T (t)$.\n\n[samples]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ T_s = 70 $ be the ambient temperature.  \nLet $ T_0 = 210 $ be the initial temperature of the coffee.  \nLet $ k \\in \\mathbb{R}^+ $ be the decay constant, determined by the condition $ T(15) = 120 $.  \n\nThe cooling model is:  \n$$ T(t) = T_s + (T_0 - T_s) e^{-kt} $$\n\n**Constraints**  \n1. $ n \\in \\mathbb{Z} $, $ n \\geq 1 $ — number of test cases.  \n2. For each test case, input $ T(t) \\in \\mathbb{R} $, with $ 70 < T(t) \\leq 210 $.  \n\n**Objective**  \nFor each test case, solve for $ t $:  \n$$ T(t) = 70 + (210 - 70) e^{-kt} $$  \n$$ \\Rightarrow t = -\\frac{1}{k} \\ln\\left( \\frac{T(t) - 70}{140} \\right) $$  \n\nwhere $ k $ is precomputed from:  \n$$ 120 = 70 + 140 e^{-15k} \\Rightarrow k = -\\frac{1}{15} \\ln\\left( \\frac{50}{140} \\right) = \\frac{1}{15} \\ln\\left( \\frac{140}{50} \\right) $$","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10269170","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}