test cases are working properly but still wrong answer
#include
using namespace std;
int main()
{
int n,t,i,j,count=0,min;
int a[50];
cin>>t;
while(t>0)
{
cin>>n;
for(i=0;i<n;i++)
cin>>a[i];
min=a[0];
for(i=0;i<n;i++)
{
if(a[i]<min)
min=a[i];
}
count=0;
for(i=0;i<n;i++)
{
if(a[i]%min==0)
count++;
}
if(count==n)
{
for(i=0;i<n;i++)
cout<<a[i]/min<<" ";
}
else
for(i=0;i<n;i++)
cout<<a[i]<<" ";
cout<<endl;
t–;
}
return 0;
}