Accenture interview question

coding adding the array on numbers and calculating the repeated values in matrix.