#659. C++-数据存储与读入-鸡兔同笼
C++-数据存储与读入-鸡兔同笼
Background
Description
鸡兔同笼,共有35个头,94只脚,求鸡和兔子各多少只? 设鸡有x只,兔子有y只,由题意得方程组 x+y=35 2x+4y=94 联立解得x = 23, y = 12 试用程序实现上述过程,输入头与脚的数量,算出鸡和兔子的只数
Format
Input
Output
Samples
35
94
23 12
Limitation
1s, 1024KiB for each test case.
Statistics
Related
In following contests:
In following homework: