Answer:
Number of balls left = 520 balls.
Step-by-step explanation:
First case
Since the box is cubic, number of layers balls = 10
Total number of 10 x 10 layer = 5
Total number of 9 x 9 layer = 5
Total number of balls = 5 x 10 x 10 + 5 x 9 x 9 = 905
Second case.
Number of balls in bottom layer = 10 x 10 = 100
Number of balls in second layer = 9 x 9 = 81
So, total number of balls = 100 + 81 + 64 + 49 + ...........+ 1
= 1² + 2² + 3² +.... 10²
We have sum of squares of first n natural numbers =

Here n = 10
Number of balls

Number of balls left = 905 - 385 = 520 balls.