aboutsummaryrefslogtreecommitdiff
path: root/problem15.erl
blob: eef8fa905889c3f839db2f90dea9cd18aeecbf35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
-module(problem15).
-export([solve/0]).

solve() ->
	N = 40,
	K = 20,
	fact(N) div (fact(K) * fact(N-K)).

fact(0) ->
	1;
fact(N) ->
	N * fact(N-1).