Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Chef is fond of burgers and decided to make as many burgers as possible.
Chef has AA patties and BB buns. To make 11 burger, Chef needs 11 patty and 11 bun.
Find the maximum number of burgers that Chef can make.
For each test case, output the maximum number of burgers that Chef can make.
Input:
4
2 2
2 3
3 2
23 17
Output:
2
2
2
17
Test case 1: Chef has 22 patties and 22 buns, and therefore Chef can make 22 burgers.
Test case 2: Chef has 22 patties and 33 buns. Chef can make at most 22 burgers by using 22 patties and 22 buns.
Test case 3: Chef has 33 patties and 22 buns. Chef can make at most 22 burgers by using 22 patties and 22 buns.
Test case 4: Chef has 2323 patties and 1717 buns. Chef can make at most 1717 burgers by using 1717 patties and 1717 buns.
T = int(input())
for _ in range(T):
a,b = map(int,input().split())
print(int(min(a,b)))
import java.util.*;
import java.lang.*;
import java.io.*;
class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
for (int i=1;i<=t;i++){
int patties = sc.nextInt();
int buns = sc.nextInt();
if(patties>buns){
System.out.println(buns);
}
else{
System.out.println(patties);
}
}
}
}
#include <iostream>
using namespace std;
int main() {
int t;
cin>>t;
while(t--){
int a,b;
cin>>a>>b;
cout<<min(a,b)<<endl;
}
return 0;
}
In our experience, we suggest you solve this Burgers 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 Burgers CodeChef Solution
I hope this Burgers 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 >>