#include using namespace std;

int main() { int count = 0; for (int i = 0; i <= 100; i++) { for (int j = 0; j <= 100; j++) { int k = 100 - i - j; if (9 * i + 2 * j + 4 * k == 100) { cout << i << ' ' << j << ' ' << k << endl; count++; } } } cout << "Total solutions: " << count << endl; return 0; }


原文地址: https://www.cveoy.top/t/topic/jriB 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录