提交时间:2023-10-07 13:48:34

运行 ID: 105653

#include <iostream> using namespace std; int n , m; int a(int s,int c) { if(c == m) return s == 1 ? 1 : 0; return a(s % n + 1 , c + 1 ) + a(s != 1 ? s - 1 : n , c + 1); } int main() { cin >> n >> m; cout << da(1 , 0); return 0; }