Hard
086Basic Calculator
Evaluate an expression containing non-negative integers, +, -, parentheses, and spaces.
EXAMPLES
Example 1
Input
{
"s": "1 + 1"
}
Output
2FUNCTION SHAPE
s: string→intEvaluate an expression containing non-negative integers, +, -, parentheses, and spaces.
EXAMPLES
Input
{
"s": "1 + 1"
}
Output
2FUNCTION SHAPE
s: string→intRuns solve(...) locally in a browser worker. SWE Playbook does not submit your code. Only run code you trust; Python code may access the network.