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
def distIntegers ( L , R ) : NEW_LINE INDENT return 2 * R - 2 * L + 1 NEW_LINE DEDENT if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT L , R = 3 , 8 NEW_LINE print ( distIntegers ( L , R ) ) NEW_LINE DEDENT