First, I tried calculating it the long way: n!/(n-k)!k! 70 bytes.
Then I read the wikipedia article about the relationship between (n choose k) and Pascal's triangle. Pascal's kth element of the nth row is (n k). 65 bytes, but so slow as to fail the tests.
Then I thought back to the Pascal's Triangle challenge earlier in this series. Bingo. 39 bytes.
First, I tried calculating it the long way:
n!/(n-k)!k!
70 bytes.
Then I read the wikipedia article about the relationship between (n choose k) and Pascal's triangle.
Pascal's kth element of the nth row is (n k).
65 bytes, but so slow as to fail the tests.
Then I thought back to the Pascal's Triangle challenge earlier in this series. Bingo.
39 bytes.
Anyone trying something different?