Average Value
면접 대비시간 제한2초메모리 제한2048 MB
배열이 주어질 때, 나머지 n-1개 원소의 기하평균과 값이 같은 원소의 인덱스를 찾는다.
문제
You are given an array of integers. Find any index () such that the element equals to the geometric mean of all the other elements. In other words, find any index that satisfies the following formula:
입력
The first line contains one integer (): the length of the array.
The second line contains integers (; the total number of digits in all numbers does not exceed ).
It is guaranteed that the answer exists for the given array.
출력
Output one integer: the index of the element that equals to geometric mean of the others items. It there are several answers, output any one of them.