#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; }
注册一个 accode 通用账户,您就可以在我们提供的所有在线评测服务上提交代码、参与讨论。
使用您的 accode 通用账户