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

19 lines
847 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;
int main() {
//https://zhidao.baidu.com/question/542222767.html
/**
韩信分油的具体分法bai
第一步把十斤油桶的油倒du满3斤小葫芦3斤小葫芦里的油再倒入zhi7 斤大葫芦里,循环三次。
此时油桶有油1斤大葫芦里有油7斤小葫芦里有油2斤
第二步,把大葫芦里的油倒入油桶;把小葫芦里的油倒入大葫芦
此时油桶里有油8斤大葫芦里有油2斤小葫芦里没有油为零
第三步,把油桶里的油倒满小葫芦,小葫芦里的油再倒入大葫芦;
此时油桶里有油5斤大葫芦里有油5斤小葫芦里没有油为零.每人得五斤,分完。
*/
cout << 10 - 3 * 3 + 7 - 3 << endl;
return 0;
}