semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main(){
	int n,s=0,a[15],f,i;
	double b[15],sum=0;
	scanf("%d",&n);
	for(i=1;i<=n;i++){
		scanf("%d",&a[i]);
		s+=a[i];
	}
	for(i=1;i<=n;i++){
		scanf("%d",&f);
		if(f>=90){b[i]=4;}
		else if(f>=85){b[i]=3.7;}
		else if(f>=82){b[i]=3.3;}
		else if(f>=78){b[i]=3;}
		else if(f>=75){b[i]=2.7;}
		else if(f>=72){b[i]=2.3;}
		else if(f>=68){b[i]=2;}
		else if(f>=64){b[i]=1.5;}
		else if(f>=60){b[i]=1;}
		else {b[i]=0;}
	}
	for(i=1;i<=n;i++){
		sum+=a[i]*b[i];
	}
	printf("%.2lf",sum/s);
	return 0;
}
int main()
{
    float sz[10][10];
	int k;
	float zong=0;
	scanf("%d",&k);
	for(int i=0;i<k;i++){
		scanf("%f",&sz[0][i]);
		zong=zong+sz[0][i];
	}
	float sum;
	sum=0;
	for(int t=0;t<k;t++){
		scanf("%f",&sz[1][t]);
		if(sz[1][t]>=90&&sz[1][t]<=100) sum=sum+4*sz[0][t];
		if(sz[1][t]>=85&&sz[1][t]<=89) sum=sum+3.7*sz[0][t];
		if(sz[1][t]>=82&&sz[1][t]<=84) sum=sum+3.3*sz[0][t];
		if(sz[1][t]>=78&&sz[1][t]<=81) sum=sum+3.0*sz[0][t];
		if(sz[1][t]>=75&&sz[1][t]<=77) sum=sum+2.7*sz[0][t];
		if(sz[1][t]>=72&&sz[1][t]<=74) sum=sum+2.3*sz[0][t];
		if(sz[1][t]>=68&&sz[1][t]<=71) sum=sum+2.0*sz[0][t];
		if(sz[1][t]>=64&&sz[1][t]<=67) sum=sum+1.5*sz[0][t];
		if(sz[1][t]>=60&&sz[1][t]<=63) sum=sum+1.0*sz[0][t];
	    if(sz[1][t]<60) sum=sum+0*sz[0][t];
	}
	float GPA;
	GPA=sum/zong;
	printf("%.2f",GPA);
	return 0;
}
int main()
{  int i,n,b[11],p,sum=0;
   float a[11],k[101],GPA=0;

   for(i=0;i<=59;i++) k[i]=0;
   for(i=60;i<=63;i++) k[i]=1.0;
   for(i=64;i<=67;i++) k[i]=1.5;
   for(i=68;i<=71;i++) k[i]=2.0;
   for(i=72;i<=74;i++) k[i]=2.3;
   for(i=75;i<=77;i++) k[i]=2.7;
   for(i=78;i<=81;i++) k[i]=3.0;
   for(i=82;i<=84;i++) k[i]=3.3;
   for(i=85;i<=89;i++) k[i]=3.7;
   for(i=90;i<=100;i++) k[i]=4.0;

  scanf("%d\n",&n);  
  for(i=1;i<=n;i++)
      scanf("%d",&b[i]);   
   scanf("\n");
   for(i=1;i<=n;i++)
   {
     scanf("%d",&p);
     a[i]=k[p];
     GPA=GPA+a[i]*b[i];
     sum=sum+b[i];
   }

  GPA=GPA/sum;
  printf("%.2f",GPA);
}
int main()
{
	int n, xf[10], df[10] , i;
	double a, sum1=0, sum2=0, z, xfjd[10];
	scanf("%d", &n);
	for(i=0; i<n; i++){
		scanf("%d", &xf[i]);
	}
	for(i=0; i<n; i++){
		scanf("%d", &df[i]);
	}
	for(i=0; i<n; i++){
		if(90<=df[i] && df[i]<=100){
			a=4.0;
		}
		if(85<=df[i] && df[i]<=89){
			a=3.7;
		}
		if(82<=df[i] && df[i]<=84){
			a=3.3;
		}
		if(78<=df[i] && df[i]<=81){
			a=3.0;
		}
		if(75<=df[i] && df[i]<=77){
			a=2.7;
		}
		if(72<=df[i] && df[i]<=74){
			a=2.3;
		}
		if(68<=df[i] && df[i]<=71){
			a=2.0;
		}
		if(64<=df[i] && df[i]<=67){
			a=1.5;
		}
		if(60<=df[i] && df[i]<=63){
			a=1.0;
		}
		if(df[i]<60){
			a=0;
		}
		xfjd[i]=a*xf[i];
	}
	for(i=0; i<n; i++){
		sum1=sum1+xfjd[i];
	}
	for(i=0; i<n; i++){
		sum2=sum2+xf[i];
	}
	for(i=0; i<n; i++){
		z=sum1/sum2;
	}
	printf("%.2f", z);

	return 0;
}
int main()
{
    int i,n,s;
    double ds=0;
    s=0;
    scanf("%d",&n);
    int a[n];
    int b[n];
    double c[n];
    double d[n];
    for(i=0;i<n;i++)
    {
        scanf("%d",&(a[i]));
    }
     for(i=0;i<n;i++)
     {
         s=s+a[i];
     }
     for(i=0;i<n;i++)
     {
         scanf("%d",&b[i]);
         if (b[i]<=100&&b[i]>=90) {c[i]=4.0;}
         else if(b[i]<=89&&b[i]>=85) {c[i]=3.7;}
         else if(b[i]<=84&&b[i]>=82) {c[i]=3.3;}
         else if(b[i]<=81&&b[i]>=78) {c[i]=3.0;}
         else if(b[i]<=77&&b[i]>=75) {c[i]=2.7;}
         else if(b[i]<=74&&b[i]>=72) {c[i]=2.3;}
         else if(b[i]<=71&&b[i]>=68) {c[i]=2.0;}
         else if(b[i]<=67&&b[i]>=64) {c[i]=1.5;}
         else if(b[i]<=63&&b[i]>=60) {c[i]=1.0;}
         else if(b[i]<60){c[i]=0;}
         d[i]=1.0*a[i]*c[i];
     }
     for(i=0;i<n;i++)
     {
        ds=ds+d[i]; 
     }
     printf("%.2lf",1.0*ds/s);
    return 0;
}
int main()
{
	int xiajie[11]={100,90,85,82,78,75,
	 72,68,64,60,0};
	double st[11]={0,4.0,3.7,3.3,3.0,2.7,
	 2.3,2.0,1.5,1.0,0};
    int n,score[10],defen,i,j,sums=0;
    double sumj=0.0,jidian[10];
    scanf("%d",&n);
    for (i=1;i<=n;i++) scanf("%d",&score[i]);
	for (i=1;i<=n;i++) 
	{
		scanf("%d",&defen);
		j=0;
		while ((j<10)&&(defen<xiajie[j]))
        {
        	jidian[i]=st[++j];
        }
        jidian[i]*=score[i];
	}
	for (i=1;i<=n;i++) sumj+=jidian[i];
	for (i=1;i<=n;i++) sums+=score[i];
	printf("%.2lf",1.0*sumj/sums);    
}
int main()
{
	int n,i,j,d;
	int g01[10];
	float g02[10],GPA=0,e=0,sum01=0,sum02=0;

	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&g01[i]);
	}
	for(j=0;j<n;j++)
	{
		scanf("%d",&d);
		if(d>=90&&d<=100)
			e=4.0;
		if(d>=85&&d<=89)
			e=3.7;
		if(d>=82&&d<=84)
			e=3.3;
		if(d>=78&&d<=81)
			e=3.0;
		if(d>=75&&d<=77)
			e=2.7;
		if(d>=72&&d<=74)
			e=2.3;
		if(d>=68&&d<=71)
			e=2.0;
		if(d>=64&&d<=67)
			e=1.5;
		if(d>=60&&d<=63)
			e=1;
		if(d<=60)
			e=0;
		g02[j]=e*g01[j];
	}
	for(i=0;i<n;i++)
	{
		sum01=sum01+g02[i];
		sum02=sum02+g01[i];
	}
	GPA=sum01/sum02;
	printf("%.2f",GPA);
}
int main()
{
	struct point{
	float s;int r;};
	struct point a[10]={0,0};
	int n,i;
	float d=0.0,result=0.0,t=0.0;

	scanf("%d",&n);
	for (i=0;i<n;i++)
	{
		scanf("%f",&a[i].s);
		t=t+a[i].s;
	}
	for (i=0;i<n;i++)
		scanf("%d",&a[i].r);
	for (i=0;i<n;i++)
		{
			if (a[i].r>=90) d=4.0;
			if (a[i].r<=89&&a[i].r>=85) d=3.7;
			if (a[i].r<=84&&a[i].r>=82) d=3.3;
			if (a[i].r<=81&&a[i].r>=78) d=3.0;
			if (a[i].r<=77&&a[i].r>=75) d=2.7;
			if (a[i].r<=74&&a[i].r>=72) d=2.3;
			if (a[i].r<=71&&a[i].r>=68) d=2.0;	
			if (a[i].r<=67&&a[i].r>=64) d=1.5;
			if (a[i].r<=63&&a[i].r>=60) d=1.0;
		a[i].s=a[i].s*d;
		d=0;
		}
	for (i=0;i<n;i++)
		result=result+a[i].s;
		result=result/t;
		printf("%.2f",result);
}
void main()
{
	int n,i;
	int a[9];int b[9];
	float c[9];
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d",&a[i]);
	for(i=0;i<n;i++)
		scanf("%d",&b[i]);
	float f(int a,int b);
	for(i=0;i<n;i++)
		c[i]=f(a[i],b[i]);
    float sum1=0;int sum2=0;
	for(i=0;i<n;i++)
	{sum1+=c[i];sum2+=a[i];}
	float GPA;
	GPA=sum1/sum2;
	printf("%.2f\n",GPA);
}
float f(int a,int b)
{
	float c;
	if(b>=90&&b<=100)c=4.0;
	else if(b>=85&&b<=89)c=3.7;
	else if(b>=82&&b<=84)c=3.3;
	else if(b>=78&&b<=81)c=3.0;
	else if(b>=75&&b<=77)c=2.7;
	else if(b>=72&&b<=74)c=2.3;
	else if(b>=68&&b<=71)c=2.0;
	else if(b>=64&&b<=67)c=1.5;
	else if(b>=60&&b<=63)c=1.0;
	else c=0;
	return(c*a);
}
int main()
{
	int n,i,j,k,h,a[10],c[10],y;
	float b[10],sum=0,GPA,p=0;
    scanf("%d\n",&n);
	for (i=0;i<n;i++)
	{ 
        scanf("%d\n",&c[i]);
	}
	for (j=0;j<n;j++)
	{
		scanf("%d\n",&a[j]);
	}
	for(k=0;k<n;k++)
	{
        if(a[k]>=90&&a[k]<=100)
		{
			b[k]=4.0;
		}
		else if(a[k]>=85&&a[k]<=89)
		{
			b[k]=3.7;
		}
		else if(a[k]>=82&&a[k]<=84)
		{
			b[k]=3.3;
		}
		else if(a[k]>=78&&a[k]<=81)
		{
			b[k]=3.0;
		}
		else if(a[k]>=75&&a[k]<=77)
		{
			b[k]=2.7;
		}
		else if(a[k]>=72&&a[k]<=74)
		{
			b[k]=2.3;
		}
		else if(a[k]>=68&&a[k]<=71)
		{
			b[k]=2.0;
		}
		else if(a[k]>=64&&a[k]<=67)
		{
			b[k]=1.5;
		}
		else if(a[k]>=60&&a[k]<=63)
		{
			b[k]=1.0;
		}
		else {
			b[k]=0;
		}
	}
	for(h=0;h<n;h++)
	{
		sum=sum+b[h]*c[h];
	}
	for(y=0;y<n;y++)
	{
		p+=c[y];
	}
    GPA=sum/p;
	printf("%.2f",GPA);
}
void main()
{
	int n,i,f[100],g[100],sum;
	float c,b,d,e;
	scanf("%d\n",&n);
	sum=0;
	c=0;
	
	for(i=0;i<=(n-1);i++)
	{
		scanf("%d",&f[i]);
		sum=sum+f[i];
	}

	for(i=0;i<=(n-1);i++)
	{
		scanf("%d",&g[i]);
		if(g[i]>=90)
			b=4.0;
		else if(g[i]>=85)
			b=3.7;
		else if(g[i]>=82)
			b=3.3;
		else if(g[i]>=78)
			b=3.0;
		else if(g[i]>=75)
			b=2.7;
		else if(g[i]>=72)
			b=2.3;
		else if(g[i]>=68)
			b=2.0;
		else if(g[i]>=64)
			b=1.5;
		else if(g[i]>=60)
			b=1.0;
		else
			b=0;
        
		d=b*f[i];

		c=c+d;
	}

	e=c/sum;
	printf("%.2f\n",e);
}
int main()
{
	int n,i,a[10],b[10],j=0;
	float c[10]={0},k=0;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&a[i]);}for(i=0;i<n;i++){
			scanf("%d",&b[i]);}
		for(i=0;i<n;i++){
		if(b[i]>89)c[i]=a[i]*4.0;
		else if(b[i]>84&&b[i]<90)c[i]=a[i]*3.7;
		else if(b[i]>81&&b[i]<85)c[i]=a[i]*3.3;
		else if(b[i]>77&&b[i]<82)c[i]=a[i]*3.0;
		else if(b[i]>74&&b[i]<78)c[i]=a[i]*2.7;
		else if(b[i]>71&&b[i]<75)c[i]=a[i]*2.3;
		else if(b[i]>67&&b[i]<72)c[i]=a[i]*2.0;
		else if(b[i]>63&&b[i]<68)c[i]=a[i]*1.5;
        else if(b[i]>59&&b[i]<64)c[i]=a[i]*1.5;
        else if(b[i]<60)c[i]=0.0;}
	for(i=0;i<n;i++){k=k+c[i];j=j+a[i];}
	k=k/j;printf("%.2f\n",k);}
int main(int argc, char* argv[])
{int n,score[10],i,grade[10],zongfen=0;
double zong=0,jidian[10];
scanf("%d\n",&n);
for(i=0;i<n-1;i++)
scanf("%d ",&grade[i]);
scanf("%d\n",&grade[n-1]);
for(i=0;i<n-1;i++)
scanf("%d ",&score[i]);
scanf("%d",&score[n-1]);
for(i=0;i<n;i++){
	if(90<=score[i]&&score[i]<=100)
		jidian[i]=4.0*grade[i];
	else if(85<=score[i]&&score[i]<=89)
        jidian[i]=3.7*grade[i];
	else if(82<=score[i]&&score[i]<=84)
		jidian[i]=3.3*grade[i];
	else if(78<=score[i]&&score[i]<=81)
		jidian[i]=3.0*grade[i];
	else if(75<=score[i]&&score[i]<=77)
		jidian[i]=2.7*grade[i];
	else if(72<=score[i]&&score[i]<=74)
		jidian[i]=2.3*grade[i];
	else if(68<=score[i]&&score[i]<=71)
		jidian[i]=2.0*grade[i];
	else if(64<=score[i]&&score[i]<=67)
		jidian[i]=1.5*grade[i];
	else if(60<=score[i]&&score[i]<=63)
		jidian[i]=1.0*grade[i];
	else if(score[i]<60)
		jidian[i]=0*grade[i];
	zong+=jidian[i];
	zongfen+=grade[i];
}
double GPA=zong/zongfen;
printf("%.2lf\n",GPA);
		

	
	return 0;
}
int main()
{
	int n;
	scanf("%d",&n);
	int xuefen[10];
	int sum1=0;
	float defen[10];
	float jidian[10];
	float xueji[10];
	float gpa;
	int i,j;
	for(i=0;i<n;i++)
	{
		scanf("%d",&xuefen[i]);
		sum1+=xuefen[i];
	}
	for(j=0;j<n;j++)
	{
		scanf("%f",&defen[j]);
		if(defen[j]>=90)
			jidian[j]=4.0;
		else if(defen[j]>=85&&defen[j]<=89)
			jidian[j]=3.7;
        else if(defen[j]>=82&&defen[j]<=84)
			jidian[j]=3.3;
        else if(defen[j]>=78&&defen[j]<=81)
			jidian[j]=3.0;
        else if(defen[j]>=75&&defen[j]<=77)
			jidian[j]=2.7;
        else if(defen[j]>=72&&defen[j]<=74)
			jidian[j]=2.3;
        else if(defen[j]>=68&&defen[j]<=71)
			jidian[j]=2.0;
        else if(defen[j]>=64&&defen[j]<=67)
			jidian[j]=1.5;
        else if(defen[j]>=60&&defen[j]<=63)
			jidian[j]=1.0;
        else
			jidian[j]=0;
	}
	int k;
	float sum2;
	for(k=0;k<n;k++)
	{
		xueji[k]=jidian[k]*xuefen[k];
		sum2+=xueji[k];
	}
	gpa=sum2/(float)sum1;
	printf("%.2f",gpa);
	return 0;
}
void main()
{
	int n;
	int xf[10],score[10],a;
	float jd[10],sjd[10],sum,GPA;
	int i,j;
	sum=0.0;
	a=0;
	
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d",&xf[i]);
	for(i=0;i<n;i++)
		scanf("%d",&score[i]);
	for(j=0;j<n;j++)
	{
		if(score[j]>=90)
			jd[j]=4.0;
		else if(score[j]>=85)
			jd[j]=3.7;
		else if(score[j]>=82)
			jd[j]=3.3;
		else if(score[j]>=78)
			jd[j]=3.0;
		else if(score[j]>=75)
			jd[j]=2.7;
		else if(score[j]>=72)
			jd[j]=2.3;
		else if(score[j]>=68)
			jd[j]=2.0;
		else if(score[j]>=64)
			jd[j]=1.5;
		else if(score[j]>=60)
			jd[j]=1.0;
		else jd[j]=0;
	}
	for(j=0;j<n;j++)
	{
		sjd[j]=jd[j]*xf[j];
		sum=sum+sjd[j];
		a=a+xf[j];
	}
	GPA=sum/a;
	printf("%.2f",GPA);
}
int main(int argc, char *argv[])
{
  int n,i;
  float gpa,sum=0,all=0,final;
  int point[20],mark[20];
  scanf("%d",&n);
  for(i=1;i<=n;i++)
  {
    scanf("%d",&point[i]);
  }
  for(i=1;i<=n;i++) scanf("%d",&mark[i]);
  for(i=1;i<=n;i++) 
  {
    if(mark[i]>=90) gpa=4.0;
    else if(mark[i]>=85) gpa=3.7;
    else if(mark[i]>=82) gpa=3.3;
    else if(mark[i]>=78) gpa=3.0;
    else if(mark[i]>=75) gpa=2.7;
    else if(mark[i]>=72) gpa=2.3;
    else if(mark[i]>=68) gpa=2.0;
    else if(mark[i]>=64) gpa=1.5;
    else if(mark[i]>=60) gpa=1.0;
    else gpa=0;
    all=all+point[i]*gpa;
    sum+=point[i];
  }
  final=all/sum;
  printf("%.2f",final);
  return 0;
}
int main()
{
	int n,i;
	int xf[10],sf[10];
	float G[10];
	float sumjdxf=0;
	int sumxf=0;
	float GPA;
	float jdxf[10];

	scanf("%d",&n);
	for(i=0;i<n;i++)
    	scanf("%d",&xf[i]);
    for(i=0;i<n;i++)
		scanf("%d",&sf[i]);
	for(i=0;i<n;i++){
	   if(sf[i]>=90)
		   G[i]=4.0;
	   

	   if((sf[i]<90)&&(sf[i]>=85))
		   G[i]=3.7;
	   
	   if((sf[i]<85)&&(sf[i]>=82))
		   G[i]=3.3;
	   if((sf[i]<82)&&(sf[i]>=78))
		   G[i]=3.0;
	   if((sf[i]<78)&&(sf[i]>=75))
		   G[i]=2.7;
	   if((sf[i]<75)&&(sf[i]>=72))
		   G[i]=2.3;
	   if((sf[i]<72)&&(sf[i]>=68))
		   G[i]=2.0;
	   if((sf[i]<68)&&(sf[i]>=64))
		   G[i]=1.5;
	   if((sf[i]<64)&&(sf[i]>=60))
		   G[i]=1.0;
	   if(sf[i]<60)
		   G[i]=0;
	   jdxf[i]=G[i]*xf[i];
	   sumjdxf+=jdxf[i];
	   }
	 for(i=0;i<n;i++)
		   sumxf+=xf[i];
	 GPA=sumjdxf/sumxf;
	 printf("%.2f",GPA);
	 return 0;
}
int main()
{
	int n,i,j,k,GPA,point[11],grade[11],pointsum=0;
	float gpa[11],gradesum=0.0;
	scanf("%d\n",&n);
	for(i=1;i<=n;i++)
		scanf("%d",&point[i]);

	for(j=1;j<=n;j++)
		scanf("%d",&grade[j]);
	for(k=1;k<=n;k++)
	{
		
			if(grade[k]<=100&&grade[k]>=90) gpa[k]=4.0;
			else if(grade[k]<=89&&grade[k]>=85) gpa[k]=3.7;
			else if(grade[k]<=84&&grade[k]>=82) gpa[k]=3.3;
			else if(grade[k]<=81&&grade[k]>=78) gpa[k]=3.0;
			else if(grade[k]<=77&&grade[k]>=75) gpa[k]=2.7;
			else if(grade[k]<=74&&grade[k]>=72) gpa[k]=2.3;
			else if(grade[k]<=71&&grade[k]>=68) gpa[k]=2.0;
			else if(grade[k]<=67&&grade[k]>=64) gpa[k]=1.5;
			else if(grade[k]<=63&&grade[k]>=60) gpa[k]=1.0;
			else if(grade[k]<=59&&grade[k]>=0)  gpa[k]=0.0;
			else printf("your input is wrong");
		gradesum+=gpa[k]*point[k]; 
		pointsum+=point[k];
	

	}


	

  
	printf("%.2f",gradesum/pointsum);
	return 0;
}
int main()
{
	int n;
	float grade=0,point[10];
	cin>>n;
	int j;
	for(j=0;j<n;j++)
	{
		cin>>point[j];
	}
	int i;
	
	int entry,total=0;
	float sum=0;	
	for(i=0;i<n;i++)
	{
		cin>>entry;
		if(entry>=90)
		grade=4.0;
		else if(entry>=85)
		grade=3.7;
		else if(entry>=82)
		grade=3.3;
		else if(entry>=78)
		grade=3.0;
		else if(entry>=75)
		grade=2.7;
		else if(entry>=72)
		grade=2.3;
		else if(entry>=68)
		grade=2.0;
		else if(entry>=64)
		grade=1.5;
		else if(entry>=60)
		grade=1.0;
		else
		grade=0;
		sum+=grade*point[i];
		total+=point[i];
	}
	float average=sum/total;
	cout<<fixed<<setprecision(2)<<average<<endl;
	return 0;
}
int main()
{
	int n,i;
	scanf("%d",&n);
	int xuefen[n],defen[n];
	int sigma=0;
	double gpa[n];
	double grade=0;
	for(i=0;i<n;i++)
	{
		scanf("%d",&xuefen[i]);
		sigma=sigma+xuefen[i];
	}
	for(i=0;i<n;i++)
	{
		scanf("%d",&defen[i]);
		if(defen[i]>=90)
		{
			gpa[i]=4.0;
			gpa[i]=gpa[i]*xuefen[i];
			grade=grade+gpa[i];
		}
		else if(defen[i]>=85)
		{
			gpa[i]=3.7;
			gpa[i]=gpa[i]*xuefen[i];
			grade=grade+gpa[i];
		}
		else if(defen[i]>=82)
		{
			gpa[i]=3.3;
			gpa[i]=gpa[i]*xuefen[i];
			grade=grade+gpa[i];
		}
		else if(defen[i]>=78)
		{
			gpa[i]=3.0;
			gpa[i]=gpa[i]*xuefen[i];
			grade=grade+gpa[i];
		}
		else if(defen[i]>=75)
		{
			gpa[i]=2.7;
			gpa[i]=gpa[i]*xuefen[i];
			grade=grade+gpa[i];
		}
		else if(defen[i]>=72)
		{
			gpa[i]=2.3;
			gpa[i]=gpa[i]*xuefen[i];
			grade=grade+gpa[i];
		}
		else if(defen[i]>=68)
		{
			gpa[i]=2.0;
			gpa[i]=gpa[i]*xuefen[i];
			grade=grade+gpa[i];
		}
		else if(defen[i]>=64)
		{
			gpa[i]=1.5;
			gpa[i]=gpa[i]*xuefen[i];
			grade=grade+gpa[i];
		}
		else if(defen[i]>=60)
		{
			gpa[i]=1.0;
			gpa[i]=gpa[i]*xuefen[i];
			grade=grade+gpa[i];
		}
		else if(defen[i]<60)
		{
			gpa[i]=0.0;
			gpa[i]=gpa[i]*xuefen[i];
			grade=grade+gpa[i];
		}
	}
	grade=grade/sigma;
	printf("%.2lf",grade);
	return 0;
}
int main()
{
	int n,i;
	double a[10],b[10],c[10],d[10],D=0,A=0,GPA;
	cin>>n;
	for(i=0;i<n;i++){
		cin>>a[i];}
	for(i=0;i<n;i++){
		cin>>b[i];}
	for(i=0;i<n;i++){
		if(b[i]>=90&&b[i]<=100){
			c[i]=4.0;}
		if(b[i]>=85&&b[i]<=89){
			c[i]=3.7;}
		if(b[i]>=82&&b[i]<=84){
			c[i]=3.3;}
		if(b[i]>=78&&b[i]<=81){
			c[i]=3.0;}
		if(b[i]>=75&&b[i]<=77){
			c[i]=2.7;}
		if(b[i]>=72&&b[i]<=74){
			c[i]=2.3;}
		if(b[i]>=68&&b[i]<=71){
			c[i]=2.0;}
		if(b[i]>=64&&b[i]<=67){
			c[i]=1.5;}
		if(b[i]>=60&&b[i]<=63){
			c[i]=1.0;}
		if(b[i]<60){
			c[i]=0;}}
	for(i=0;i<n;i++){
		d[i]=a[i]*c[i];}
	for(i=0;i<n;i++){
		D+=d[i];
		A+=a[i];}
	GPA=D/A;
	printf("%.2f\n",GPA);
	return 0;
}
//*************
//????*****
int main()
{
	int n=0,i=0,a[10]={0},b[10]={0};
	float gra[10]={0},sum[10]={0},Sum1=0,Sum2=0,GPA=0;
	cin>>n;
	for(i=0;i<n;i++)
	{cin>>a[i];}                              //??????
	for(i=0;i<n;i++)
	{cin>>b[i];}                              //??????
	for(i=0;i<n;i++)
	{
		if(b[i]<=100&&b[i]>=90)
		{gra[i]=4.0;}
		if(b[i]<=89&&b[i]>=85)
		{gra[i]=3.7;}
		if(b[i]<=84&&b[i]>=82)
		{gra[i]=3.3;}
		if(b[i]<=81&&b[i]>=78)
		{gra[i]=3.0;}
                if(b[i]<=77&&b[i]>=75)
		{gra[i]=2.7;}
		if(b[i]<=74&&b[i]>=72)
		{gra[i]=2.3;}
		if(b[i]<=71&&b[i]>=68)
		{gra[i]=2.0;}
	        if(b[i]<=67&&b[i]>=64)
		{gra[i]=1.5;}
		if(b[i]<=63&&b[i]>=60)
		{gra[i]=1.0;}
		if(b[i]<60)
		{gra[i]=0.0; } 
	}                                          //??????????
		for(i=0;i<n;i++)
		{
			sum[i]=a[i]*gra[i];
	    }                                      //???????????
	for(i=0;i<n;i++)
	    {
			Sum2=Sum2+sum[i];
	    }                                      //??????????
	for(i=0;i<n;i++)
	{
		Sum1=Sum1+a[i];
	}                                          //??????????
	GPA=Sum2/Sum1;                             //?????
	printf("%.2f",GPA);
	return 0;
}
int main()
{int i,j,n,b=0;
double GPA,a=0;
int xf[10],fs[10];
double jd[10];
scanf("%d\n",&n);
for(i=0;i<n;i++)
	{scanf("%d",&(xf[i]));}
printf("\n");
for(j=0;j<n;j++)
	{scanf("%d",&(fs[j]));}
for(i=0;i<n;i++)
{   if(fs[i]>=90)
		{jd[i]=4.0;}
    else if(fs[i]>=85)
		{jd[i]=3.7;}
    else if(fs[i]>=82)
		{jd[i]=3.3;}
    else if(fs[i]>=78)
		{jd[i]=3.0;}
    else if(fs[i]>=75)
		{jd[i]=2.7;}
    else if(fs[i]>=72)
		{jd[i]=2.3;}
    else if(fs[i]>=68)
		{jd[i]=2.0;}
    else if(fs[i]>=64)
		{jd[i]=1.5;}
    else if(fs[i]>=60)
		{jd[i]=1.0;}
    else{jd[i]=0.0;}
	}
for(i=0;i<n;i++)
	{a=a+(xf[i])*(jd[i]);
	b=b+(xf[i]);}
GPA=1.0*a/b;
printf("%.2lf",GPA);
}
int main ()
{
	int n;
	int sumxuefen = 0;
	int i;
	float sumjidian = 0;
	float sumxuefenjidian = 0;
	float GPA;	
	int xuefen[10];
	int scores[10];
	float jidian[10];
	float xuefenjidian[10];
	scanf("%d", &n);
	for(i=0;i<n;i++){
		scanf("%d", &xuefen[i]);
		sumxuefen = sumxuefen + xuefen[i];
	}
	for(i=0;i<n;i++){
		scanf("%d",&scores[i]);
		if(scores[i]==100||scores[i]==99||scores[i]==98||scores[i]==97||scores[i]==96||scores[i]==95||scores[i]==94||scores[i]==93||scores[i]==92||scores[i]==91||scores[i]==90){
			jidian[i] = 4.0;
		}
		else if(scores[i]==89||scores[i]==88||scores[i]==87||scores[i]==86||scores[i]==85){
			jidian[i] = 3.7;
		}
		else if(scores[i]==84||scores[i]==83||scores[i]==82){
			jidian[i] = 3.3;
		}
		else if(scores[i]==81||scores[i]==80||scores[i]==79||scores[i]==78){
			jidian[i] = 3.0;
		}
		else if(scores[i]==77||scores[i]==76||scores[i]==75){
			jidian[i] = 2.7;
		}
		else if(scores[i]==74||scores[i]==73||scores[i]==72){
			jidian[i] = 2.3;
		}
		else if(scores[i]==71||scores[i]==70||scores[i]==69||scores[i]==68){
			jidian[i] = 2.0;
		}
		else if(scores[i]==67||scores[i]==77||scores[i]==65||scores[i]==64){
			jidian[i] = 1.5;
		}
		else if(scores[i]==63||scores[i]==62||scores[i]==61||scores[i]==60){
			jidian[i] = 2.0;
		}
		else {
			jidian[i] = 0;
		}
			sumjidian = sumjidian + jidian[i];
	}
	for(i=0;i<n;i++){
	    xuefenjidian[i] = jidian[i] * xuefen[i];
	}
  for(i=0;i<n;i++){
	  sumxuefenjidian = sumxuefenjidian + xuefenjidian[i];
  }
		GPA = sumxuefenjidian * 1.00/sumxuefen;
		printf("%.2f", GPA);
		return 0;
	}
int main()
{
	int n,a[10],b[10],i;
	double c[10];    
	scanf("%d",&n);               //?????
	for (i=0;i<n;i++)
	{
		scanf("%d",&a[i]);        //????
	}
	for (i=0;i<n;i++)
	{
		scanf("%d",&b[i]);        //????
	}
	for (i=0;i<n;i++)             //????
	{
		if (b[i]>=90)
			c[i]=4.0;
		else if (b[i]>=85)
			c[i]=3.7;
		else if (b[i]>=82)
			c[i]=3.3;
		else if (b[i]>=78)
			c[i]=3.0;
		else if (b[i]>=75)
			c[i]=2.7;
		else if (b[i]>=72)
			c[i]=2.3;
		else if (b[i]>=68)
			c[i]=2.0;
		else if (b[i]>=64)
			c[i]=1.5;
		else if (b[i]>=60)
			c[i]=1.0;
		else 
			c[i]=0;
	}
	double sum1=0,sum2=0,GPA;
	for (i=0;i<n;i++)
	{
		sum1=sum1+a[i]*c[i];  //??????
		sum2=sum2+a[i];       //????
	}
	GPA=sum1/sum2;
	printf("%.2f",GPA);

	return 0;
}
int main(){
	int a[100],b[100],n,i,s,xfh=0;
	double jd,jdh=0,gpa;
	scanf("%d\n",&n);
	for(i=0;i<n;i++){
		scanf("%d",&a[i]);
		xfh+=a[i];
	}
	for(s=0;s<n;s++){
		scanf("%d",&b[s]);
		if ((b[s]<=100)&&(b[s]>=90)){
			jd=4.0*a[s];
		}else if ((b[s]<=89)&&(b[s]>=85)){
			jd=3.7*a[s];
		}else if ((b[s]<=84)&&(b[s]>=82)){
			jd=3.3*a[s];
		}else if ((b[s]<=81)&&(b[s]>=78)){
			jd=3.0*a[s];
		}else if ((b[s]<=77)&&(b[s]>=75)){
			jd=2.7*a[s];
		}else if ((b[s]<=74)&&(b[s]>=72)){
			jd=2.3*a[s];
		}else if ((b[s]<=71)&&(b[s]>=68)){
			jd=2.0*a[s];
		}else if ((b[s]<=67)&&(b[s]>=64)){
			jd=1.5*a[s];
		}else if ((b[s]<=63)&&(b[s]>=60)){
			jd=4.0*a[s];
		}else{
			jd=0.0;
		}
		jdh+=jd;
	}
	gpa=jdh/xfh;
	printf ("%.2lf",gpa);
	return 0;
}
int main(){
	int a[10],m[10],n,i,c;
	float GPA,b,s;
	scanf("%d",&n);
	s=0;
	c=0;
	for(i=0;i<n;i++){
		scanf("%d",&m[i]);
		c+=m[i];
	}
	for(i=0;i<n;i++){
		scanf("%d",&a[i]);
		if(90<=a[i]&&a[i]<=100){
			b=4.0;}
                if(85<=a[i]&&a[i]<=89){
                        b=3.7;}
		if(82<=a[i]&&a[i]<=84){
			b=3.3;}
		if(78<=a[i]&&a[i]<=81){
			b=3.0;}
		if(75<=a[i]&&a[i]<=77){
                        b=2.7;}
	        if(72<=a[i]&&a[i]<=74){
	                b=2.3;}
                if(68<=a[i]&&a[i]<=71){
			b=2.0;}
	        if(64<=a[i]&&a[i]<=67){
		        b=1.5;}
	        if(60<=a[i]&&a[i]<=63){
		        b=1.0;}
	        if(a[i]<60){
	                b=0.0;}
		s+=b*m[i];
		
	}
	GPA=s/c;
	printf("%.2f",GPA);
	return 0;
}
main()
{
	int i=0,j,n;
	float a[3][10];
	float GPA=0;
	scanf("%d\n",&n);
	for(j=0;j<=n-1;j++)
	{
		scanf("%f",&a[0][j]);
		i=i+a[0][j];
	}
	for(j=0;j<=n-1;j++)
	{
		scanf("%f",&a[1][j]);
		if(a[1][j]>=90)
			a[2][j]=4.0;
		else if(a[1][j]>=85)
			a[2][j]=3.7;
		else if(a[1][j]>=82)
			a[2][j]=3.3;
		else if(a[1][j]>=78)
			a[2][j]=3.0;
		else if(a[1][j]>=75)
			a[2][j]=2.7;
		else if(a[1][j]>=72)
			a[2][j]=2.3;
		else if(a[1][j]>=68)
			a[2][j]=2.0;
		else if(a[1][j]>=64)
			a[2][j]=1.5;
		else if(a[1][j]>=60)
			a[2][j]=1.0;
		else a[2][j]=0;
		a[2][j]=a[2][j]*a[0][j];
	}
	for(j=0;j<=n-1;j++)
		GPA=GPA+a[2][j];
	GPA=GPA/i;
	printf("%.2f",GPA);
}
int main(){
	int n,i,total=0;
	int score[10],mark[10];
	float gpa;
	float avg=0;
	cin>>n;
	for(i=0;i<n;i++){
		cin>>score[i];
		total+=score[i];
	}
	for(i=0;i<n;i++){
		cin>>mark[i];
		int temp=mark[i];
		if(temp<=100&&temp>=90) gpa=4.0;
		else if(temp<90&&temp>84) gpa=3.7;
		else if(temp<85&&temp>81) gpa=3.3;
		else if(temp<82&&temp>77) gpa=3.0;
		else if(temp<=77&&temp>74) gpa=2.7;
		else if(temp<=74&&temp>71) gpa=2.3;
		else if(temp<=71&&temp>67) gpa=2.0;
		else if(temp<=67&&temp>63) gpa=1.5;
		else if(temp<=63&&temp>59) gpa=1.0;
		else if(temp<60) gpa=0.0;
		avg+=gpa*score[i];
	}
	avg/=total;
	printf("%.2f\n",avg);
	//cout<<avg<<endl;
	return 0;
}
void main()
{
int a[10],b[10],i,c;
float d[10],s=0,l=0;
scanf("%d",&c);
for(i=0;i<c;i++)
scanf("%d",&b[i]);
for(i=0;i<c;i++)
scanf("%d",&a[i]);
for(i=0;i<c;i++)
{
if(a[i]>=90&&a[i]<=100)
d[i]=4.0*b[i];
if(a[i]>=85&&a[i]<=89)
d[i]=3.7*b[i];
if(a[i]>=82&&a[i]<=84)
d[i]=3.3*b[i];
if(a[i]>=78&&a[i]<=81)
d[i]=3.0*b[i];
if(a[i]>=75&&a[i]<=77)
d[i]=2.7*b[i];
if(a[i]>=72&&a[i]<=74)
d[i]=2.3*b[i];
if(a[i]>=68&&a[i]<=71)
d[i]=2.0*b[i];
if(a[i]>=64&&a[i]<=67)
d[i]=1.5*b[i];
if(a[i]>=60&&a[i]<=63)
d[i]=1.0*b[i];
if(a[i]<=60)
d[i]=0;
s=s+d[i];
l=l+b[i];
}
s=s/l;
printf("%.2f\n",s);
}