#include <stdio.h>
const int MOD=1e9+7;
int main() {
int a, b;
while (scanf("%d %d", &a, &b) != EOF) { // 注意 while 处理多个 case
// 64 位输出请用 printf("%lld") to
int arr[1010][1010]={0};
int i,j;
arr[1][1] = 1;
for (int i=2;i<=a;i++){
arr[i][1] = 1;
}
for (int j =2;j<=b;j++){
arr[1][j] = 1;
}
for(int i=2;i<=a;i++){
for (int j=2;j<=b;j++){
arr[i][j] = (arr[i-1][j] + arr[i][j-1]) % MOD;
}
}
printf("%d",arr[a][b]);
}
return 0;
}



京公网安备 11010502036488号