copied description; wrote solution (accepts arbitrary max, arbitrary bases); created a make file