human
Count triplets from a given range having sum of two numbers of a triplet equal to the third number | Function to find the number of triplets from the range [ L , R ] having sum of two numbers from the triplet equal to the third number.
Stores the total number of triplets.
Find the difference of the range.
Case 1 : If triplets can 't  be formed, then return 0.
Otherwise.
Update the total number of triplets.
Return the count.
Driver Code"
Solution in Python:
assistant
#Here is code to count triplets from a given range having sum of two numbers of a triplet equal to the third number and the other steps required.
 def totalCombination ( L , R ) :
	count = 0
	K = R - L
	if ( K < L ) :
		return 0
	ans = K - L
	count = ( ( ans + 1 ) * ( ans + 2 ) ) // 2
	return count
if __name__ == ' _ _ main _ _ ' :
	L , R = 2 , 6
	print ( totalCombination ( L , R ) )