题目描述
Welcome back to our new town named Errorinous Town. The most characteristics of this town is that people of the town follow a very different Number System for their numerical calculations.
For example, Integer value 36 (lets say) in Normal Number System means "Thirty-Six" , but in
Errorinous Town this will be equal to 63 , i.e, "Sixty-Three".
Akio, a shopkeeper from the town is a very interesting character. She never sells any Product without any Error in the calculation.
She always sells item I of Price P with an Error of E% . This errored price is actual MRP according to Errorinous Town Number System.
But the Price according to Normal Number System will be a different one. And we would like to co-relate the Price of any Item according to Errorinous Town with Normal Number System after the Profit/Lose.
You are given Price of an Item I followed by the Percentage Error E.
Your task is to output the final Price Q of the Item I according to Normal Number System when the Profit/Lose of Price of Item according to Errorinous Town with respect to Normal Number System is added with the Errored Price.
Note : For more explanantion see sample case.
Input : First line will contains an Integer T , number of Test Cases. Next T lines will have two integers P , Price of Item and E , percentage error.
Output : For each Test Case give the output in new line.
Constraints
1 ≤ T ≤25
10 ≤ P ≤ 10000
-70 ≤ E ≤ 70
Note :- To be Eligible for Prizes you have to register and create your home address maptag.
Important update : In input you have given a Price P of item and percentage of error E which will effect the selling price for that item. But this is in Errorinous Number System. And the Profit/Lose will be calculated when this price in Actual Number System is co-related with price P in Errorinous Number System. Finally you have to find out the Final Price when this profit/Lose is counted with Errorinous Number System's Errored Price. Final Price is rounded price.
Note : This update in reference with all your queries. Well Done to candidates who solved it.
Click here to create your Maptag
SAMPLE INPUT
2
12 70
20 -70
SAMPLE OUTPUT
37
10
Explanation
For case 1, Errored Price will be 20, and Price according to Normal Number System will be 2. There is a Profit of 83.33% when the Price is co-related. So this makes the our final Price Q equal to 37
Update : Final price is according to Errorinous Town Number System. So please calculate in that.
输入格式
见题面
输出格式
见题面