24-solution.c

build a compute tree and calculate it