Project Euler 62 - Cubic permutations

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