Count distinct sum of pairs possible from a given range | Function to count distinct sum of pairs possible from the range [ L , R ] ; Return the count of distinct sum of pairs ; Driver Code
function distIntegers ( L , R ) { return 2 * R - 2 * L + 1 ; } let L = 3 , R = 8 ; document . write ( distIntegers ( L , R ) ) ;