Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
61539 | zhangweiran | 不定方程求解 | C++ | Accepted | 0 MS | 244 KB | 291 | 2025-03-02 22:23:11 |
#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; }