6 条题解

  • 2
    @ 2025-11-29 15:41:22

    号称从未输过的法国赌神:

    皮克松

    #include <iostream>
    using namespace std;
    int main() {
       long a[101] = {0}, b[101] = {0};
       int x, y, z;
       cin >> x >> y >> z;
       for (int i = 1; i <= x; i++) {
           a[i] = 1;
           b[i] = 0;
       }
       for (int i = x + 1; i <= z + 1; i++) {
           b[i] = y * a[i - x]; 
           a[i] = a[i - 1] + b[i - 2]; 
       }
       cout << a[z + 1] << endl; 
       return 0;
    }
    

    信息

    ID
    1266
    时间
    1000ms
    内存
    256MiB
    难度
    5
    标签
    递交数
    244
    已通过
    88
    上传者