Solution to 10 in C. Much faster than the others.