提交时间:2024-05-05 14:01:43

运行 ID: 39743

#include<bits/stdc++.h> using namespace std; long long n,b,mg[51][51]; int main(){ cin>>n>>b; for(int j=0;j<b;j++){ mg[0][j]=1; } for(int i=1;i<n;i++){ for(int j=0;j<b;j++){ mg[i][j]=mg[i-1][j]+mg[i][j-1]; } } cout<<mg[n-1][b-1]; return 0; }