give integer array num return sum floornumsi numsj pair index 0 j numslength array since answer large return modulo 109 7the floor function return integer division Example 1input num 259output 10explanationfloor2 5 floor2 9 floor5 9 0floor2 2 floor5 5 floor9 9 1floor5 2 2floor9 2 4floor9 5 1we calculate floor division pair index array sum upexample 2input num 7777777output 49 Constraints1 numslength 1051 numsi 105