Type: Default 1000ms 128MiB

鸡兔同笼

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

说明

题目描述

数学中经典的“鸡兔同笼”问题,已知头共head个,脚共foot只,问笼中的鸡和兔各有多少只

输入格式

输入只有一行,为两个正整数,依次为头的个数和脚的只数。(保证头和脚的个数符合鸡、兔的规律)

输出

输出为一行为两个整数,两整数由一个空格隔开,分别是鸡的只数和兔的只数。

样例输入

30 90

样例输出

15 15

样例

鸡兔同笼(不同的题型)

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
15
Start at
2024-5-15 17:00
End at
2024-5-24 1:00
Duration
200 hour(s)
Host
Partic.
17