#include<stdio.h>
#include<stdlib.h>
#include<math.h>
int cmp(const void *a,const void *b)
{
	return *(int *)b-*(int *)a;
}
int main()
{
	int T,num;int i,j,k,p;
	float s,sum,a[600];
	scanf("%d",&T);
	while(T--)
	{
		scanf("%d",&num);
		for(j=0;j<num;j++)
			scanf("%f",&a[j]);
		qsort(a,num,sizeof(a[0]),cmp);
		sum=0.0;k=0;
		for(p=0;p<num;p++)
		{
			if(a[p]>1)
				s=2*sqrt(a[p]*a[p]-1);	
			else
				break;
			sum+=s;
			k++;
			if(sum>=20.0)
				break;
		}
		printf("%d\n",k);
	}
	return 0;
}

  

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-23
  • 2021-07-26
  • 2022-02-24
  • 2021-07-23
猜你喜欢
  • 2021-05-14
  • 2021-08-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-17
相关资源
相似解决方案