University of Calgary

digit tree

Digit Tree
source: ACM programming contest

Using each digit from 1-9 once, make 7 numbers so that each number is equal to the sum of the numbers in the circles that are connected to it from below. The numbers can be more than one digit.

 

Write a program that will solve the problem and print out the "tree".



Updated: August 30, 2005 05:23 PM