2 ms·
Another approach that often works for these kinds of problems and does not require much intelligence: Work out the first few cases by hand (1,2,6,20 in our cas
by johndough 4mo ago
Another approach that often works for these kinds of problems and does not require much intelligence:
Work out the first few cases by hand (1,2,6,20 in our case) and then look up the sequence on "The On-Line Encyclopedia of Integer Sequences" (OEIS):
https://oeis.org/search?q=1%2C2%2C6%2C20&language=english&go=Search https://oeis.org/search?q=1%2C2%2C6%2C20&language=english&go...