{"raw_statement":[{"iden":"statement","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"},{"iden":"input","content":"The 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."},{"iden":"output","content":"For 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.*"}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**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$$","simple_statement":"You start at floor n and fight a battles. Each win moves you up 1 floor, each loss moves you down 1 floor. You win each battle with probability p/100. What’s your expected final floor?","has_page_source":false}