Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
For each bill you pay using CRED, you earn X CRED coins.
At CodeChef store, each bag is worth 100 CRED coins.
Chef pays Y number of bills using CRED. Find the maximum number of bags he can get from the CodeChef store.
For each test case, output in a single line – the maximum number of bags Chef can get from the CodeChef store.
Input: 3
10 10
20 4
70 7
Output: 1
0
4
Test Case 1: For each bill payment, one receives 10 CRED coins. Chef pays 10 bills using CRED. Thus, he receives 100 CRED coins. Chef can get 1 bag from the CodeChef store using these coins.
Test Case 2: For each bill payment, one receives 20 CRED coins. Chef pays 4 bills using CRED. Thus, he receives 80 CRED coins. Chef cannot get any bag from the CodeChef store using these coins.
Test Case 3: For each bill payment, one receives 70 CRED coins. Chef pays 7 bills using CRED. Thus, he receives 490 CRED coins. Chef can get at most 4 bags from the CodeChef store using these coins.
#include <iostream>
using namespace std;
int main() {
// your code goes here
int t;
cin >> t;
while( t--){
int x, y;
cin >> x>> y;
cout << x * y / 100<<endl;
}
return 0;
}
# cook your dish here
t= int(input())
for i in range(t):
x,y = map(int,input().split(" "))
p = x*y
print(int(p/100))
/* 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*y;
System.out.println(x/100);
}
}
}
In our experience, we suggest you solve this CRED 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 CRED Coins CodeChef Solution
I hope this CRED 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 >>