Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
8154 D班-西瓜 数的划分 C++ 通过 100 22 MS 260 KB 246 2025-03-26 15:43:18

Tests(5/5):


#include <bits/stdc++.h> using namespace std; int n,k; int f(int n,int k) { if (k == 1) { return 1; } if (n < k) { return 0; } return f(n-k,k) + f(n-1,k-1); } int main() { cin >> n >> k; cout << f(n,k); return 0; }


测评信息: