Completed P024
 - Includes both calculated and brute force versions