#E. C++-数据存储与读入-鸡兔同笼

    Type: Default 1000ms 256MiB

C++-数据存储与读入-鸡兔同笼

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

Description

鸡兔同笼,共有35个头,94只脚,求鸡和兔子各多少只? 设鸡有x只,兔子有y只,由题意得方程组 x+y=35 2x+4y=94 联立解得x = 23, y = 12 试用程序实现上述过程,输入头与脚的数量,算出鸡和兔子的只数 image

Format

Input

Output

Samples

35
94
23 12

Limitation

1s, 1024KiB for each test case.

创建一个新的比赛Test

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
5
Start at
2024-7-21 0:00
End at
2024-8-2 12:00
Duration
300 hour(s)
Host
Partic.
7