#D. (初中组)鸡兔同笼

    Type: Default 1000ms 256MiB

(初中组)鸡兔同笼

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.

Background

Special for beginners, ^_^

Description

笼子里有一些鸡和一些兔子,已知一只鸡有两条腿,一只兔子有四条腿,现在告诉你笼子里有 xx 个头和 yy 条腿,问笼子里有多少只鸡,多少只兔子?

Format

Input

一行两个正整数 xxyy 分别代表头数和脚数。

Output

一行两个用空格分开的正整数分别代表鸡数和兔子数。

Samples

20 58
11 9

Limitation

1x100001\leq x\leq 100001y400001\leq y\leq 40000,保证问题有解。

水题过家家

Not Attended
Status
Done
Rule
IOI
Problem
8
Start at
2023-5-20 8:00
End at
2023-5-20 12:00
Duration
4 hour(s)
Host
Partic.
49