CPKit
v1.6.1

Expression Evaluator

ArithmeticMedium

Safely parse and evaluate mathematical equations containing priorities and float divisions.

Alt+6

Evaluation Panel

Example Test Cases

Parentheses grouping
Input:(3 + 5) * (10 - 2)
Output:64
Load Case
Float products and division priorities
Input:2.5 * 4 + (15 / 3)
Output:15
Load Case
Nested priorities
Input:100 - (20 + 30) / 2
Output:75
Load Case

Complexity Specs

Time ComplexityO(N)
Space ComplexityO(N)

Contest Notes & Bounds

  • Supports parentheses priorities, decimal values, and operators (+, -, *, /, %).
  • Inputs are parsed securely using strict regex filters.
  • Parentheses pairing is verified before execution to prevent compile errors.