C and Python trial division solutions for Problem 10