Problem 2272 Frog

TimeLimit:1000MS  MemoryLimit:262MB
64-bit integer IO format:%I64d
未提交 | 登录后收藏
Problem Description

Therearex frogs and y chicken in a garden. Kim found there are n heads and m legs in the garden. Please tell Kim how many frogs and chicken are there. (A frog has 4 legs, and a chicken has 2 legs.)

Input

First line contains an integer T (1 ≤ T ≤ 10), represents there are T test cases.

For each test case: Two number n and m.

1<=n, m <=100000. The data is legal.

Output

For each test case, output two numbers A and B – the number of frog and the number of chicken.

SampleInput
2
2 6
2 4
SampleOutput
1 1
0 2
Submit
题目统计信息详细
总AC数23
通过人数22
尝试人数23
总提交量31
AC率70.97%
AC该题后可以添加标签
贴完标签可以获得20ACB。
并且可以获得本题所有提交代码查看权限。
点击标题可以显示标签。
如果你还没认真思考过这题,请不要查看标签
如果您已经通过了该题,请务为该题贴上标签

T^T Online Judge

[BUG反馈] [FAQ] [闽ICP备17026590号-1]
当前版本:3.24 系统时间: