提交时间:2024-10-27 08:24:07

运行 ID: 54284

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