Project Euler

Problem #15

Starting in the top left corner of a 2×2 grid, there are 6 routes (without backtracking) to the bottom right corner.

How many routes are there through a 20×20 grid?

Erlang: Running time = 0.11s
+%factorial

+%pow

p15()->io:format("~w~n",[factorial(40) div pow(factorial(20),2)]).

Ruby: Running time = 0.02s
+#factorial

def p15
  puts factorial(40)/(factorial(20)**2)
end