### ACSL Practice 2009

## Task 6: Expression

Given an arithmetic expression, output its value.

The expression will be given without spaces, but it may contain the four operators (+, -, /, *) and brackets ().

The regular order of evaluation applies. Division here is regarded as integer division.

(There will be no strange or invalid expressions, like `5(2(2))`

)

### Sample Input

5*(3+3)-2-2

### Sample Output

26

### Sample Input 2

5*3*4/-7

### Sample Output 2

-8

All Submissions

Best Solutions

**Point Value:** 15 (partial)

**Time Limit:** 2.00s

**Memory Limit:** 16M

**Added:** May 19, 2009

**Languages Allowed:**

C++03, PAS, C, ASM, C++11

## Comments (Search)

pibombon Feb 15, 2015 - 6:04:31 pm UTC Java not allowed?xrav3nzon Feb 15, 2015 - 6:21:35 pm UTC Re: Java not allowed?thorthugnastyon Dec 30, 2013 - 4:31:50 am UTCbbi5291on Dec 30, 2013 - 4:45:29 am UTC Re: ...