[Solution] Janmansh and Coins solution codechef

Janmansh and Coins solution codechef – Janmansh received XX coins of 1010 rupees and YY coins of 55 rupees from Chingari. Since he is weak in math, can you find out how much total money does he have?

Input Format

  • The first line will contain TT – the number of test cases. Then the test cases follow.
  • The first and only line of each test case contains two integers XXYY – the number of 1010 and 55 rupee coins respectively.

Janmansh and Coins solution codechef

For each test case, output how much total money does Janmansh have.

Constraints

  • 1T1001≤T≤100
  • 0X,Y1000≤X,Y≤100

Sample Input 1 

2
2 1
3 4

Janmansh and Coins solution codechef

 

25
50

Janmansh and Coins Explanation

Test case-1: He has 22 coins of 1010 rupees and 11 coin of 55 rupees. Hence he has 210+5=252⋅10+5=25 rupees.

Test case-2: He has 33 coins of 1010 rupees and 44 coins of 55 rupees. Hence he has 310+45=503⋅10+4⋅5=50 rupees.

For solution

Click here

Leave a Comment