All submissions for this problem are available.
In the Mathematical world of Dr. Ramanujam, every new student must have to pass a exam to take the classes of Advance mathematics from Dr. Ramanujam.
One day Ram wants to have classes of Advance mathematics, so he arrived at class of Dr. Ramanujam. He asked Ram to solve a given mathematical expression then only he will be eligible to take classes. Mathematical expression is in a string form of numbers(0-9) and operators(+,-,*). Dr. Ramanujam asked him to find the answer of the expression but there is a twist that, he does not want him to follow "Operator precedence rule", rather he have his own precedence rule in which he need to operate operations from right to left.
For eg: Given string 2 + 3 * 5, So 3 * 5 will be operated first then +2 will be performed in result of 3 * 5.
He asked him to solve as fast as possible. So Ram needs your help to solve the expression.
First line contain test cases T. Next T lines contain one string.
1<=Length of the String(L)<=31
Answer of the given expression.
|Time Limit:||2 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, SCM chicken, CLOJ, FS|
Fetching successful submissions