Description: Suppose there are n pillars, according to the following rules are in this n pillars placed sequentially numbered 1,2,3, ... balls.
(1) Each time only in the top of a pillar to put the ball.
(2) In the same pillar, any two adjacent numbers of balls for the perfect square.
Try to design an algorithm to calculate the n pillars can put up to how many balls. For example, in a maximum of four pillars
Put 11 balls.
Programming tasks:
For a given n, compute the n pillars can put up to how many balls.
To Search:
File list (Check if you may need any files):
magic-ball.c
Lawn drainage.c