#include <bits/stdc++.h> using namespace std;
int main() { int a, b, c, s = 0; cin >> a >> b >> c; for (int x = 0; x <= c / a; x++) { for (int y = 0; y <= c / b; y++) { if (a * x + b * y == c) s++; } } cout << s; return 0; }
Using your 蒙青创OJ universal account