You are given an array A of size N . Generate an array B of size N . Find the sum of array B.
Array B has a definite property. For every i where 1<=i<=n
1. \(B[i]=A[i]/X\)
2. \(A[i]%X==0\)%X==0
2. X is a perfect square.
X can be varied.
Find the minimum possible sum of array B.
INPUT
First line of input contains a single integer N denoting size of array A.
Next line contains N seperated integers of array A.
OUTPUT
Output the sum of new array B.
CONSTRAINTS
1<=N<=1000000
1<=A[i]<=1000000
25/25 + 16/16 + 18/9 + 10/1 + 24/4 = 20
the new array B ={1,1,2,10,6}
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor
No editorial available for this problem.
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor