Fruit Combinations
##### Problem statement You are handed `a` apples and `b` oranges by Rohan. He wants to organize the fruits into baskets which he will sell later on. However, there are some rules for these baskets, - each basket must have **exactly** 4 fruits. - each basket should have **at least one** apple and **at least one** orange. Rohan wants to know how many baskets can be created from `a` apples and `b` oranges. Help him find the maximum number of baskets that can be formed. **Example #1** _Input:_ ``` 4 4 ``` _Output:_ ``` 2 ``` _Explanation:_ ```(with 4 apples and 4 oranges, 2 teams of 'apple x2 orange x2' can be formed)``` **Example #2** _Input:_ ``` 9 1 ``` _Output:_ ``` 1 ``` _Explanation:_ ```(with 9 apples and 1 orange, only 1 team of 'apple x3 orange' can be formed)```
Example #1
Input:
4 4

Output:
2
Example #2
Input:
9 1

Output:
1
Example #3
Input:
8 2

Output:
2
Example #4
Input:
1000000000 1000000000

Output:
500000000
Example #5
Input:
2 3

Output:
1
Example #6
Input:
16 13

Output:
7
Constraints

1 < a, b <= 10^9

Submission
Submissions
Name Email #1 #2 #3 #4 #5 #6 Correct Time View Delete
Mukti Krishna [email protected] 0/6 2023-03-02T14:25:00
Arjun Bhatnagar [email protected] 5/6 2023-03-02T14:04:00
Diya Banerjee [email protected] Not submitted
Vijay Ramaswamy [email protected] 2/6 2023-03-02T14:29:00
Justin Varghese [email protected] 6/6 2023-03-02T14:26:00
Vineeta Mehta [email protected] 5/6 2023-03-02T14:20:00