DCan somebody explain why in the example 1 3 , there is 1+2+2=5 ?
Thanks in advance.
AYou should generate array to look like this 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6. N times number N, and you can see that sum of first, second and third element is 1 + 2 + 2 = 5.
DThanks for the reply. And what about
3 7
3+4+4+4, right?
As I can see 7-3=4 is telling as the number of integers to compute, right?
But what about 50 50?
50-50=0
DThank you very much for the help. Now, I solved it.