1 条题解

  • 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

    信息

    ID
    248
    时间
    1000ms
    内存
    256MiB
    难度
    1
    标签
    递交数
    43
    已通过
    31
    上传者