Finding complementary numbers, a code jam practice question