Toggle navigation
编绘童年
F.A.Qs
ProblemSet
Source/Category
Status
Ranklist
Contest
[
ProblemSet
Status
Ranklist
OI Ranklist
Statistics
]
Login
Problem B: 穷举法练习---鸡兔同笼
Problem B: 穷举法练习---鸡兔同笼
Time Limit:
1
Sec
Memory Limit:
128 MB
Submit:
829
Solved:
591
[
Status
] [
Submit
] [Creator:
]
Description
有好多好多只鸡兔同在一个笼子里,从上面数,有X个头,从下面数,有Y只脚。问笼中各有多少只鸡和兔?
Input
输入2个正整数X,Y(1<x,y<=10000),分别代表头的数量和脚的数量
Output
输出鸡的数量和兔的数量,中间用一个空格分隔
Sample Input
Copy
35 94
Sample Output
Copy
23 12