Function that returns true if the the sum of all the perfect squares of the given array is divisible by x
static boolean check ( int arr [ ] , int x , int n ) { long sum = 0 ; for ( int i = 0 ; i < n ; i ++ ) { double y = Math . sqrt ( arr [ i ] ) ;