finished problem 16 using gmp in c!