1 solutions

  • 1
    @ 2025-7-12 16:22:04

    #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; }

    • 1

    Information

    ID
    248
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    2
    Tags
    # Submissions
    35
    Accepted
    24
    Uploaded By