{"problem":{"name":"102. Pocket Calculator","description":{"content":"Pocket Calculator You have a pocket calculator. Unfortunately, it is broken, so you need to calculate large math operations yourself. For this problem, you need to write a computer program to calcula","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10269102"},"statements":[{"statement_type":"Markdown","content":"Pocket Calculator\n\nYou have a pocket calculator. Unfortunately, it is broken, so you need to calculate large math operations yourself. For this problem, you need to write a computer program to calculate the answer to a long math operation, with multiplication (denoted by an asterisk *), division (denoted by a slash / ), addition, and subtraction. There will not be parentheses or exponents. Recall order of operations: multiplication and division (with equal weight) from left to right first, followed by addition and subtraction (with equal weight) from left to right. *Using eval() or similar commands for this problem is not allowed.*\n\nThe only line of input contains a line of text representing a math operation to calculate. The math operation will consist of one-digit numbers and the four operations described above, with exactly one space between each one. The input line will start and end with a number, and there will *not* be an equals sign at the end of the operation.\n\nOutput a single integer: the answer to the math operation. The answer is guaranteed to fit inside of a 32-bit signed integer type. The answer is also guaranteed to be an integer.\n\nIn the third sample, $9. 0$ would also be judged as correct.\n\n## Input\n\nThe only line of input contains a line of text representing a math operation to calculate. The math operation will consist of one-digit numbers and the four operations described above, with exactly one space between each one. The input line will start and end with a number, and there will *not* be an equals sign at the end of the operation.\n\n## Output\n\nOutput a single integer: the answer to the math operation. The answer is guaranteed to fit inside of a 32-bit signed integer type. The answer is also guaranteed to be an integer.\n\n[samples]\n\n## Note\n\nIn the third sample, $9. 0$ would also be judged as correct.","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ E $ be a string representing a mathematical expression consisting of single-digit integers and operators $ \\{+, -, *, /\\} $, with exactly one space between each token.  \n\nLet $ T = [t_0, t_1, \\dots, t_{m-1}] $ be the list of tokens obtained by splitting $ E $ by spaces, where each $ t_i $ is either a digit (converted to integer) or an operator.  \n\n**Constraints**  \n1. $ |T| \\geq 1 $, and $ |T| $ is odd.  \n2. Tokens at even indices (0-indexed) are integers in $ \\{0, 1, \\dots, 9\\} $.  \n3. Tokens at odd indices are operators in $ \\{+, -, *, /\\} $.  \n4. The expression contains no parentheses or exponents.  \n5. The result is guaranteed to be an integer within the range of a 32-bit signed integer.  \n\n**Objective**  \nCompute the value of $ E $ following standard order of operations:  \n- First, evaluate all $ * $ and $ / $ operations **left to right**.  \n- Then, evaluate all $ + $ and $ - $ operations **left to right**.  \n\nOutput the resulting integer.","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10269102","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}