How Many Marbles?

A number of children played at marbles. Each child won a different number of games and the total number of games won by the boys equaled the total number of games won by the two girls. As a momento of the occasion, they each received a present of marbles, equal to the square of the number of games he or she had won. In total, the boys received as many marbles as the girls, and the total number of marbles received was less than 100. How many marbles were given as presents?

If the number of girls is allowed to vary (not set at two as above) and the total number of marbles increases to no more than 1000, how many solutions are there?

Source: Work This One Out, Longley-Cook, #77, 1960.


Solution
Mail to Ken