Sum of each element raised to ( prime | Function to return the required sum ; Driver code
def getSum ( arr , p ) : NEW_LINE INDENT return len ( arr ) NEW_LINE DEDENT if __name__ == " _ _ main _ _ " : NEW_LINE INDENT arr = [ 5 , 6 , 8 ] NEW_LINE p = 7 NEW_LINE print ( getSum ( arr , p ) ) NEW_LINE DEDENT