eolymp
bolt
Try our new interface for solving problems
Problems

Function-10

Function-10

The function is given with nonnegative integer arguments $m$ and $n~(m \le n)$: $$ f(m, n) = \begin{cases} 1, m = 0\\ 1, m = n\\ f(m - 1, n - 1) + f(m, n - 1), 0 < m < n \end{cases} $$ Find the value of the function. \InputFile Two nonnegative integers $n$ and $m~(0 \le n, m \le 20)$. \OutputFile Print the value of the function $f(m, n)$.
Time limit 1 second
Memory limit 128 MiB
Input example #1
4 2
Output example #1
6