提交时间:2024-10-27 08:26:02
运行 ID: 54286
#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 y = 0; y <= c; y++){ if(a * x + b * y == c){ ans++; } } } cout << ans; return 0; }