提交时间:2025-12-05 15:39:09

运行 ID: 75272

#include <iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; int count = 0; for (int x = 0; x <= c / a; x++) { if ((c - a * x) % b == 0) { int y = (c - a * x) / b; if (y >= 0) count++; } } cout << count << endl; return 0; }