提交时间:2023-11-06 20:38:45

运行 ID: 30331

#include <bits/stdc++.h> using namespace std; int main() { int a, b, c, cnt = 0; cin >> a >> b >> c; for(int i = 0; i <= c; ++ i) { for(int j = 0; j <= c; ++ j) { if (i * a + j * b == c) cnt ++; } } cout << cnt; return 0; }