Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Janmansh received X coins of 10 rupees and Y coins of 5 rupees from Chingari. Since he is weak in math, can you find out how much total money does he have?
For each test case, output how much total money does Janmansh have.
Input: 2
2 1
3 4
Output: 25
50
Test case-1: He has 2 coins of 10 rupees and 1 coin of 5 rupees. Hence he has 2⋅10+5=25 rupees.
Test case-2: He has 3 coins of 10 rupees and 4 coins of 5 rupees. Hence he has 3⋅10+4⋅5=50 rupees.
#include <bits/stdc++.h>
using namespace std;
int main() {
int t;
cin>>t;
while(t--)
{
int x,y;
cin>>x>>y;
cout<<(10*x)+(5*y)<<endl;
}
return 0;
}
# cook your dish here
n=int(input())
for i in range(n):
a,b=map(int,input().split())
print(a*10+b*5)
/* package codechef; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{
// your code goes here
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
for(int i=0;i<t;i++)
{
int x=sc.nextInt();
int y=sc.nextInt();
x=x*10;
y=y*5;
System.out.println(x+y);
}
}
}
In our experience, we suggest you solve this Janmansh and Coins CodeChef Solution and gain some new skills from Professionals completely free and we assure you will be worth it.
If you are stuck anywhere between any coding problem, just visit Queslers to get the Janmansh and Coins CodeChef Solution
I hope this Janmansh and Coins CodeChef Solution would be useful for you to learn something new from this problem. If it helped you then don’t forget to bookmark our site for more Coding Solutions.
This Problem is intended for audiences of all experiences who are interested in learning about Data Science in a business context; there are no prerequisites.
Keep Learning!
More Coding Solutions >>