///...................SUBHASHIS MOLLICK....................///
///.....DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING....///
///.............ISLAMIC UNIVERSITY,BANGLADESH.............///
///.....................SESSION-(14-15)....................///
#include<stdio.h>
#include<string.h>
#include<math.h>
#include<algorithm>
#include<ctype.h>
#include<bits/stdc++.h>
using namespace std;
main()
{
long long n;
while(cin>>n)
{
long long i,j,ar[10000]={0},k,cnt=0,flag=0,cnt1=0;
double ans,k3;
if(n==0)
break;
for(i=0;i<n;i++)
{
cin>>ar[i];
}
for(i=0;i<n;i++)
{
for(j=0;j<n;j++)
{
if(i!=j)
{
cnt1++;
k=__gcd(ar[i],ar[j]);
if(k==1)
{
flag=1;
cnt++;
}
}
}
}
if(flag==1)
{
//cout<<cnt;
ans=(double(cnt1)*6.0)/(double(cnt));
printf("%.6lf\n",sqrt(ans));}
else
printf("No estimate for this data set.\n");
}
}
///.....DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING....///
///.............ISLAMIC UNIVERSITY,BANGLADESH.............///
///.....................SESSION-(14-15)....................///
#include<stdio.h>
#include<string.h>
#include<math.h>
#include<algorithm>
#include<ctype.h>
#include<bits/stdc++.h>
using namespace std;
main()
{
long long n;
while(cin>>n)
{
long long i,j,ar[10000]={0},k,cnt=0,flag=0,cnt1=0;
double ans,k3;
if(n==0)
break;
for(i=0;i<n;i++)
{
cin>>ar[i];
}
for(i=0;i<n;i++)
{
for(j=0;j<n;j++)
{
if(i!=j)
{
cnt1++;
k=__gcd(ar[i],ar[j]);
if(k==1)
{
flag=1;
cnt++;
}
}
}
}
if(flag==1)
{
//cout<<cnt;
ans=(double(cnt1)*6.0)/(double(cnt));
printf("%.6lf\n",sqrt(ans));}
else
printf("No estimate for this data set.\n");
}
}
কোন মন্তব্য নেই:
একটি মন্তব্য পোস্ট করুন