Project Euler 109 - Darts

Official link: https://projecteuler.net/problem=109

Thought Process

Quite a simple problem.

I just generate every possible checkout and sum the number of checkouts for a score less than 100, there are not that many possible combinations hence brute force is extremely quick.

There are 63 choices for first and second dart and 21 choices for the last dart, therefore there are 63*63*21 = 83,349 combinations which is very small. To avoid the double counting, since the size is so small I just brute force check that if combination (x, y, z) is already accounted for do not add (y, x, z). 

Code runs in less than a second.

Interactive Code

Input an integer (yourinput)

Code will output all the ways to checkout on a score of yourinput