First a part of the set of same balls was arranged into an equilateral triangle, 19 balls were not used, but when the sides of this triangle were needed to be one-uped, it was a 5 ball insufficiency. How many balls were in the set?
I feel like it's a contradiction in the problem.
Now I see that I misunderstood the problem. I thought it was the circuit of the triangle.
Hint:
this is about triangle numbers
the partial last row would have $19+5$ balls if complete, so the complete last row has one fewer
find the number of balls in the complete triangle and add those left over