15: python solution
16/17: used gnu bignum lib