1337 - An easy problem

Time Limit: 1s Memory Limit: 128MB

Submissions: 87 Solved: 59
Description
None Background.
Input
First line an integer T means the number of case. Next will be T line. Every line contains exact one line in the format of NUMBER1 STRING NUMBER2; If STRING is “MULTIPLY”,just output one line with the product of NUMBER1 and NUMBER2; If STRING is “ADD”,just output the sum of NUMBER1 and NUMBER2 in one line. The STRING will only be ”MULTIPLY” or “ADD”. 0<=num1,num2<=100;
Output
T line. each line with the sum or product of NUMBER1 and NUMBER2 acrodding to STRING.
Sample Input
6
15 MULTIPLY 10
15 ADD 10
5 MULTIPLY 8
5 ADD 8
100 MULTIPLY 99
100 ADD 99
Sample Output
150
25
40
13
9900
199
Hint
Source
Dongxu Li