Run ID Author Problem Lang Verdict Time Memory Code Length Submit Time
7631 luchenyuan 不定方程求解 C++ Accepted 0 MS 244 KB 316 2023-02-05 16:50:09

Tests(1/1):


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


Judgement Protocol: