BETA

Submissions : 1437 Accuracy :

20.6

Evaluate the x + a = b statement
     

Given a string of form x + a = b where a and b are integer, find value of x [Note that spaces may or may not be there, for example, input can either be x+a=b or x + a = b or x+a = b].

For example if input string is x + 12 = 3 then output should be -9

 

Constraints:
1 <=T<= 30
1 <=a,b<= 1000

Example:
Input:

2
x+5=2
x+10=20

Output:
-3
10

 

**For More Examples Use Expected Output**


Set Default Code

					   
Result:
It is recommended to test your code before clicking 'Submit' button!



                   



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.