P17452 [CodeChef] FRUITCHAAT
普及-
题目描述

Chef has closed his restaurant and decided to run a fruit stand instead. His signature dish is a fruit chaat consisting of 2 bananas and 1 apple. He currently has X bananas and Y apples. How many chaats can he make with the fruits he currently has?

------ Input Format ------

  • The first line will contain T, the number of testcases. Then the testcases follow.
  • Each testcase consists of a single line containing two space separated integers - X and Y

------ Output Format ------

For each testcase, output the answer on a new line.

------ Constraints ------

$1 ≤ T ≤ 100$
$0 ≤ X, Y ≤ 100$

----- Sample Input 1 ------
3
72 50
38 93
51 4
----- Sample Output 1 ------
36
19
4

----- explanation 1 ------
Test Case $1$: Chef can make $36$ chaats using $72$ bananas and $36$ apples.

Test Case $2$: Chef can make $19$ chaats using $38$ bananas and $19$ apples.

Test Case $3$: Chef can make $4$ chaats using $8$ bananas and $4$ apples.

输入格式

见题面

输出格式

见题面

样例输入
3 72 50 38 93 51 4
样例输出
36 19 4