{"problem":{"name":"E. Resistors in Parallel","description":{"content":"In this physics problem, what we are concerned about are only resistors. If you are poor at physics, do not worry, since solving this problem does not require you to have advanced abilities in physics","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":2000,"memory_limit":1048576},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10202E"},"statements":[{"statement_type":"Markdown","content":"In this physics problem, what we are concerned about are only resistors. If you are poor at physics, do not worry, since solving this problem does not require you to have advanced abilities in physics.\n\nResistors are said to be connected together in parallel when both of their terminals are respectively connected to each terminal of the other resistors.\n\nWe have the following parallel resistor equation for k resistors with resistances R1, R2, ..., Rk in parallel and their combined resistance R:\n\nNow you have n resistors, the i-th of which has a resistance of ri ohms with the equation\n\nYou also have n selections, the i-th of which is a set of resistors Si such that\n\nPlease find a selection in which the resistors form a parallel resistor with the minimum resistance and output the reduced fraction  of its resistance.\n\nThe input contains several test cases, and the first line contains a positive integer T indicating the number of test cases which is up to 100.\n\nFor each test case, the only one line contains an integer n, where 1 ≤ n ≤ 10100.\n\nFor each test case, output a line containing a reduced fraction of the form _p/q_ indicating the minimum possible resistance, where _p_ and _q_ should be positive numbers that are coprime.\n\n## Input\n\nThe input contains several test cases, and the first line contains a positive integer T indicating the number of test cases which is up to 100.For each test case, the only one line contains an integer n, where 1 ≤ n ≤ 10100.\n\n## Output\n\nFor each test case, output a line containing a reduced fraction of the form _p/q_ indicating the minimum possible resistance, where _p_ and _q_ should be positive numbers that are coprime.\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:  \n- Let $ n \\in \\mathbb{Z}^+ $ be the number of resistors.  \n- Let $ R = \\{ r_1, r_2, \\dots, r_n \\} \\subset \\mathbb{Z}^+ $ be the set of resistor values.  \n- Let $ \\mathcal{S} = \\{ S_1, S_2, \\dots, S_n \\} $ be the family of selections, where each $ S_i \\subseteq R $ and $ |S_i| = i $.  \n\n**Constraints**  \n1. $ 1 \\le T \\le 100 $  \n2. $ 1 \\le n \\le 10^{100} $  \n3. $ r_i \\in \\mathbb{Z}^+ $ for all $ i \\in \\{1, \\dots, n\\} $  \n\n**Objective**  \nFor each test case, find the selection $ S \\in \\mathcal{S} $ that minimizes the equivalent resistance of resistors in parallel:  \n$$\nR_{\\text{eq}}(S) = \\left( \\sum_{r \\in S} \\frac{1}{r} \\right)^{-1}\n$$  \nOutput the minimal $ R_{\\text{eq}}(S) $ as a reduced fraction $ \\frac{p}{q} $, where $ \\gcd(p, q) = 1 $ and $ p, q \\in \\mathbb{Z}^+ $.","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10202E","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}