#include <iostream>
using namespace std;
#include <vector>
vector<vector<int>> solveChickenProblem() {
vector<vector<int>> solutions;
for (int x = 0; x <= 20; x++) {
for (int y = 0; y <= 33; y++) {
int z = 100 - x - y;
if (z >= 0 && 5 * x + 3 * y + z / 3 == 100 && z % 3 == 0) {
solutions.push_back({x, y, z});
}
}
}
return solutions;
}
int main() {
vector<vector<int>> solutions = solveChickenProblem();
cout << "百钱百鸡问题的解:" << endl;
for (const vector<int>& solution : solutions) {
cout << "鸡翁:" << solution[0] << "只,鸡母:" << solution[1] << "只,鸡雏:" << solution[2] << "只" << endl;
}
return 0;
}