304 North Cardinal St.
Dorchester Center, MA 02124

# Burgers CodeChef Solution

## Problem – Burgers CodeChef Solution

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.

#### Input Format

• The first line of input will contain an integer TT — the number of test cases. The description of TT test cases follows.
• The first and only line of each test case contains two space-separated integers AA and BB, the number of patties and buns respectively.

#### Output Format

For each test case, output the maximum number of burgers that Chef can make.

#### Constraints

• 1 \leq T \leq 10001≤T≤1000
• 1 \leq A, B \leq 10^51≤A,B≤105

#### Sample 1:

Input:
4
2 2
2 3
3 2
23 17

Output:
2
2
2
17

#### Explanation:

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.

### Burgers CodeChef Solution in Python3

T = int(input())
for _ in range(T):
a,b = map(int,input().split())
print(int(min(a,b)))

### Burgers CodeChef Solution in Java


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);
}
}
}
}


### Burgers CodeChef Solution in C++14

#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;
}

##### Burgers CodeChef Solution Review:

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

Find on CodeChef

##### Conclusion:

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 >>

LeetCode Solutions

Hacker Rank Solutions

CodeChef Solutions