问题描述:
Write a python function to find element at a given index after number of rotations.

测试用例:
['assert find_Element([1,2,3,4,5],[[0,2],[0,3]],2,1) == 3', 'assert find_Element([1,2,3,4],[[0,1],[0,2]],1,2) == 3', 'assert find_Element([1,2,3,4,5,6],[[0,1],[0,2]],1,1) == 1']

生成的代码:
def find_Element(arr, rotations, num_rotations, target_index):
    # Perform the rotations as described in the problem
    for i in range(num_rotations):
        rotation = rotations[i]
        k = rotation[0]  # number of rotations
        index = rotation[1]  # index to check after rotation
        
        # Perform the rotation
        if k > 0:
            arr = arr[-k:] + arr[:-k]
    
    return arr[target_index]

# Test cases
assert find_Element([1,2,3,4,5],[[0,2],[0,3]],2,1) == 3
assert find_Element([1,2,3,4],[[0,1],[0,2]],1,2) == 3
assert find_Element([1,2,3,4,5,6],[[0,1],[0,2]],1,1) == 1