标签:
2 3
3
#include <stdio.h> long long jie[ 22 ]; int main() { int m, n; scanf("%d%d", &m, &n ); if( m == 1 || n == 1 ){ printf("1\n"); return 0; } jie[ 1 ] = 1; jie[ 2 ] = 2; for( int i = 3; i <= 20; i++ ){ jie[ i ] = jie[ i - 1 ] * i; } printf("%lld\n", jie[ m + n - 2 ] / jie[ m - 1 ] / jie[ n - 1 ]); return 0; }
标签:
原文地址:http://www.cnblogs.com/FrozenApple/p/4937090.html