#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstdlib>
using namespace std;
unsigned _c(unsigned m, unsigned n)
{
double ret = 1.0;
while (m > 0)
ret *= (double)(n--) / double(m--);
return (unsigned)(ret+0.5);
}
int main()
{
unsigned x, y;
while (scanf("%d%d", &x, &y) && (x || y))
printf("%d\n", _c(min(x, y), x + y));
return 0;
}
ACM篇:Uva 1942-- Paths on a Grid
最新推荐文章于 2017-01-11 23:23:44 发布