One test case is not getting passed

#include
#include
using namespace std;
bool checkhcf(int arr[],int n1,int n2)
{
if(n1==0)
{
return true;
}
else if(n1==1)
{
return false;
}
checkhcf(arr,n2%n1,n2);

}
int main () {
int n;
cin>>n;
int arr[n];
for(int i=0;i<n;i++)
{
cin>>arr[i];
}
sort(arr,arr+n);
for(int i=0;i<n;i++)
{
if(arr[i]!=0)
{
for(int k=i+1;k<n;k++)
{
if(checkhcf(arr,arr[i],arr[k]))
{
arr[k]=0;
}
}
}

}
int count =0;
for(int i=0;i<n;i++)
{
	if(arr[i])
	{
      count ++;
	}

}

cout<<count;
}

Hey @Bhavit_Singla
Is this the code for the question Simple Input?
Also, explain the logic behind your code please and tell the test cases which are not working

https://hack.codingblocks.com/app/practice/5/p/2564
maam this is the question link
and the second test case is not getting passed

Hello @Bhavit_Singla

Your code fails on the below test case
3
6 9 32

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.