题解

C20220025 2024-08-07 15:39:27

#include #include using namespace std;

int main() { int a, b, c; cin >> a >> b >> c; int l = 0; for (int i = 0; i <= 10000; i++) // i = x { for (int k = 0; k <= 10000; k++) // k = y { if (a * i + b * k + c == 0) { l++; } } } cout << l; return 0; }