{"problem":{"name":"H. Cube","description":{"content":"In geometry, a cube is a three-dimensional solid object bounded by six square faces, with three meeting at each vertex. The image bellow is an example of a cube. You are given the surface area of a c","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10185H"},"statements":[{"statement_type":"Markdown","content":"In geometry, a cube is a three-dimensional solid object bounded by six square faces, with three meeting at each vertex. The image bellow is an example of a cube.\n\nYou are given the surface area of a cube, and your task is to find the length of that cube's edge. Can you?\n\nThe first line contains an integer T (1 ≤ T ≤ 1000), in which T is the number of test cases.\n\nEach test case consists of a line containing an integer a (1 ≤ a ≤ 6 × 106), giving the surface area of a cube.\n\nFor each test case, print a single line containing the length of the given cube's edge.\n\n*It is guaranteed that all answers are integer numbers. Do not print any floating-point values.*\n\n## Input\n\nThe first line contains an integer T (1 ≤ T ≤ 1000), in which T is the number of test cases.Each test case consists of a line containing an integer a (1 ≤ a ≤ 6 × 106), giving the surface area of a cube.\n\n## Output\n\nFor each test case, print a single line containing the length of the given cube's edge.*It is guaranteed that all answers are integer numbers. Do not print any floating-point values.*\n\n[samples]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ n \\in \\mathbb{Z}_{\\geq 0} $ be the starting floor.  \nLet $ a \\in \\mathbb{Z}_{\\geq 0} $ be the number of battles.  \nLet $ p \\in [0, 100] $ be the win probability percentage; define $ q = \\frac{p}{100} \\in [0, 1] $ as the probability of winning a single battle.\n\n**Constraints**  \n$ 0 \\leq n, a \\leq 10^9 $,  \n$ 0 \\leq p \\leq 100 $.\n\n**Objective**  \nLet $ X $ be the random variable denoting the final floor after $ a $ battles.  \nEach win increases floor by 1, each loss decreases floor by 1.  \nLet $ W \\sim \\text{Binomial}(a, q) $ be the number of wins.  \nThen the number of losses is $ a - W $, and:  \n$$\nX = n + W - (a - W) = n + 2W - a\n$$  \nThe expected final floor is:  \n$$\n\\mathbb{E}[X] = n + 2\\mathbb{E}[W] - a = n + 2aq - a = n + a(2q - 1)\n$$","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10185H","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}