Expression - MarisaOJ: Marisa Online Judge

Expression

Time limit: 1000 ms
Memory limit: 256 MB
Given an expression consisting of addition, subtraction, and multiplication operations, calculate the result and print it. ### Input - A single line containing the expression. Addition, subtraction, and multiplication operations correspond to `+`, `-`, `*`. There are no spaces in the expression. ### Output - Print an integer which is the result of the expression. ### Constraints - Ensure that the expression can be processed using 64-bit signed integer data type (`long long` in C++). - The length of the expression does not exceed $1000$. ### Example Input: ``` 1-2*3+4*5 ``` Output: ``` 15 ```