#include <iostream>
using namespace std;
int main() {
int a, b, n;
while (cin >> a >> b >> n) {
int content = 0;
while (content != n) {
cout << "fill A" << endl;
cout << "pour A B" << endl;
content += a;
if (content > b) {
content -= b;
cout << "empty B" << endl;
cout << "pour A B" << endl;
}
}
cout << "success" << endl;
}
return 0;
}
/**************************************************************
Problem: 1147
User: cust123
Language: C++
Result: Accepted
Time:0 ms
Memory:1520 kb
****************************************************************/
题目1147:Jugs
最新推荐文章于 2020-08-05 08:50:39 发布