human
Find the element at R ' th ▁ row ▁ and ▁ C ' th column in given a 2D pattern | Function to find the R ' th ▁ row ▁ and ▁ C ' th column value in the given pattern.
First element of a given row.
Element in the given column.
Driver Code.
Function call"
Solution in Python:
assistant
#Here is code to find the element at R ' th ▁ row ▁ and ▁ C ' th column in given a 2D pattern and the other steps required.
 def findValue ( R , C ) :
	k = ( R * ( R - 1 ) ) // 2 + 1
	diff = R + 1
	for i in range ( 1 , C ) :
		k = ( k + diff )
		diff += 1
	return k
if __name__ == " _ _ main _ _ " :
	R = 4
	C = 4
	k = findValue ( R , C )
	print ( k )