Files
python/TangDou/XiTi/1421.cpp
HuangHai 1f397eca87 'commit'
2025-08-30 18:35:01 +08:00

19 lines
445 B
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include <bits/stdc++.h>
using namespace std;
/*
一批食物可供3个牛4个羊吃14天或供4个牛15个羊吃7天
请问这批食物可供6个牛与7个羊吃多少天
(3x+4y)*14=(4x+15*y)*7
42x+56y=28x+105y
14x=49y
2x=7y
假设牛每天吃7,羊每天吃2可以求的假设总量3*7+4*2*14=29*14
根据6*7+7*2得出六头牛与7只羊每天吃草56
29*14/56=29/4=7.25天。
*/
int main() {
return 0;
}