Function for the distribution of the number
function distribution ( n , k , l , r , S , Sk ) { let a = new Array ( n ) ; let len = k , temp , rem , s ; let diff = S - Sk ; for ( let i = 0 ; i < len ; i ++ ) {