#include<iostream>
using namespace std;

#define M 10
#define N 10

int t[M+1][N+1];

int main()
{
  int i, j, m, n;
  int p;

  for(i=0; i<=M; i++)
      for(j=0; j<=N; j++)
          t[i][j]= (i*j ==0) ? 1 : 0;

  for(i=1; i<=M; i++)
      for(j=1; j<=N; j++)
          t[i][j] = t[i-1][j-1] + t[i-1][j] + t[i][j-1];

  while(scanf("%d %d", &m, &n)==2)
      printf("%d\n----------\n",t[m][n]);

  system("pause");
  return 0;
}


  


文章標籤
全站熱搜
創作者介紹
創作者 LawlietMoon 的頭像
LawlietMoon

<ul type=disc><b>iPaSsioN sTuDio</b><br>新世界:雜草魂 生命力</br>

LawlietMoon 發表在 痞客邦 留言(1) 人氣(24)