semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()


{
	int n,i,j;
         
         float y=0,z=0;

	scanf("%d",&n);

	int sz[2][n];
    
	float x;

	for(i=0;i<n;i++)

	{
		scanf("%d",&sz[0][i]);

		y+=sz[0][i];

	}
    

	for(j=0;j<n;j++)

	{
		scanf("%d",&sz[1][j]);

		if(sz[1][j]>=90&&sz[1][j]<=100)x=4.0*sz[0][j];

		if(sz[1][j]>=85&&sz[1][j]<=89)x=3.7*sz[0][j];

		if(sz[1][j]>=82&&sz[1][j]<=84)x=3.3*sz[0][j];

		if(sz[1][j]>=78&&sz[1][j]<=81)x=3.0*sz[0][j];

		if(sz[1][j]>=75&&sz[1][j]<=77)x=2.7*sz[0][j];

        if(sz[1][j]>=72&&sz[1][j]<=74)x=2.3*sz[0][j];

			if(sz[1][j]>=68&&sz[1][j]<=71)x=2.0*sz[0][j];

				if(sz[1][j]>=64&&sz[1][j]<=67)x=1.5*sz[0][j];

					if(sz[1][j]>=60&&sz[1][j]<=63)x=1.0*sz[0][j];
					if(sz[1][j]<60)x=0*sz[0][j];
    z+=x;

	}

	

	float GPA;

	GPA=z/y;

printf("%.2f",GPA); 

return 0;

}
int main(){
int a[500];
int b[500];
double c[500];
double GPA;
int i,kc,j;
double sum,res;
scanf("%d\n",&kc);
for(i=0;i<kc;i++){
scanf("%d",&a[i]);
}
for(i=0;i<kc;i++){
scanf("%d",&b[i]);
}
for(i=0,j=0;i<kc,j<kc;i++,j++){
if(b[i]>=90&&b[i]<=100){
c[j]=4.0;
}else if(b[i]>=85&&b[i]<=89){
c[j]=3.7;
}else if(b[i]>=82&&b[i]<=84){
c[j]=3.3;
}else if(b[i]>=78&&b[i]<=81){
c[j]=3.0;
}else if(b[i]>=75&&b[i]<=77){
c[j]=2.7;
}else if(b[i]>=72&&b[i]<=74){
c[j]=2.3;
}else if(b[i]>=68&&b[i]<=71){
c[j]=2.0;
}else if(b[i]>=64&&b[i]<=67){
c[j]=1.5;
}else if(b[i]>=60&&b[i]<=63){
c[j]=1.0;
}else if(b[i]<60){
c[j]=0.0;
}
}
sum=0;
res=0;
for(i=0;i<kc;i++){
sum=sum+1.00*c[i]*a[i];
res=res+a[i];
}
GPA=1.00*sum/res;
printf("%.2lf",GPA);
return 0;
}
int main()
{
	int n, a[10], i, xue = 0;
	double gpa = 0, b[10];
	scanf("%d", &n);
	for(i = 0; i < n; i++)
	{
		scanf("%d", &a[i]);
		xue = xue + a[i];
	}
	for(i = 0; i < n; i++)
	{
		scanf("%lf", &b[i]);
		if(b[i] >= 90 && b[i] <= 100)
			b[i] = 4.0;
		else if(b[i] >= 85)
			b[i] = 3.7;
		else if(b[i] >= 82)
			b[i] = 3.3;
		else if(b[i] >= 78)
			b[i] = 3.0;
		else if(b[i] >= 75)
			b[i] = 2.7;
		else if(b[i] >= 72)
			b[i] = 2.3;
		else if(b[i] >= 68)
			b[i] = 2.0;
		else if(b[i] >= 64)
			b[i] = 1.5;
		else if(b[i] >= 60)
			b[i] = 1.0;
		else 
			b[i] = 0;
		gpa = gpa + b[i] * a[i];
	}
	gpa = gpa / xue;
	printf("%.2lf\n", gpa);
	return 0;
}
int main()
{
int a[10],b[10],n,i,j;
float s,c[10],s1=0.0,s2=0.0;
scanf("%d",&n);
for(i=0;i<n-1;i++){
scanf("%d",&a[i]);}
i=n-1;
scanf("%d\n",&a[i]);
for(i=0;i<n;i++){
scanf("%d",&b[i]);}
for(i=0;i<n;i++){
if(b[i]>89)
c[i]=4.0*a[i];
else if(b[i]>84)
c[i]=3.7*a[i];
else if(b[i]>81)
c[i]=3.3*a[i];
else if(b[i]>77)
c[i]=3.0*a[i];
else if(b[i]>74)
c[i]=2.7*a[i];
else if(b[i]>71)
c[i]=2.3*a[i];
else if(b[i]>67)
c[i]=2.0*a[i];
else if(b[i]>63)
c[i]=1.5*a[i];
else if(b[i]>60)
c[i]=1.0*a[i];
else c[i]=0.0;}
for(i=0;i<n;i++){
s1=s1+a[i];
s2=s2+c[i];}
s=s2/s1;
printf("%.2f",s);
return 0;
}
main()
{int a,n,i;
 float sum,f[10],b=0;
 sum=0;
 scanf("%d",&n);
 for(i=0;i<=n-1;i++)
 {scanf("%f",&f[i]);b+=f[i];}
 for(i=0;i<=n-1;i++)
 {scanf("%d",&a);
  if(a>=90&&a<=100){sum+=f[i]*4.0;continue;}
  if(a>=85&&a<=89) {sum+=f[i]*3.7;continue;}
  if(a>=82&&a<=84) {sum+=f[i]*3.3;continue;}
  if(a>=78&&a<=81) {sum+=f[i]*3.0;continue;}
  if(a>=75&&a<=77) {sum+=f[i]*2.7;continue;}
  if(a>=72&&a<=74) {sum+=f[i]*2.3;continue;}
  if(a>=68&&a<=71) {sum+=f[i]*2.0;continue;}
  if(a>=64&&a<=67) {sum+=f[i]*1.5;continue;}
  if(a>=60&&a<=63) {sum+=f[i]*1.0;continue;}
 }
 printf("%.2f",sum/b);

}
int main(){
	int n,q=0,i,xuefen[10],chengji[10];
	double p=0,zong,GPA[10],xuefenGPA[10];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&(xuefen[i]));
	}
    for(i=0;i<n;i++){
        scanf("%d",&(chengji[i]));
	}
    for(i=0;i<n;i++){
		if(chengji[i]>=90){
		GPA[i]=4.0;
		}else if(chengji[i]>=85&&chengji[i]<90){
		GPA[i]=3.7;
		}else if(chengji[i]>=82&&chengji[i]<85){
		GPA[i]=3.3;
		}else if(chengji[i]>=78&&chengji[i]<82){
		GPA[i]=3.0;
		}else if(chengji[i]>=75&&chengji[i]<78){
		GPA[i]=2.7;
		}else if(chengji[i]>=72&&chengji[i]<75){
		GPA[i]=2.3;
		}else if(chengji[i]>=68&&chengji[i]<72){
		GPA[i]=2.0;
		}else if(chengji[i]>=64&&chengji[i]<68){
		GPA[i]=1.5;
		}else if(chengji[i]>=60&&chengji[i]<64){
		GPA[i]=1.0;
		}else{
            GPA[i]=0;
		}
	}
    for(i=0;i<n;i++){
		xuefenGPA[i]=GPA[i]*xuefen[i];
	}
    for(i=0;i<n;i++){
		p+=xuefenGPA[i];
	}
    for(i=0;i<n;i++){
		q+=xuefen[i];
	}
	zong=p/q;
	printf("%.2lf",zong);

	return 0;


}
int main(){
	int n,t,xuefen=0;
	int x[10];
    int s[10];
	double j[10];
	double gpa,ji,jidian=0.0;
  scanf("%d",&n);
for(t=0;t<n;t++){
scanf("%d",&(x[t])) ;
	  }
  for(t=0;t<n;t++){
	   scanf("%d",&(s[t])) ;
  if((s[t])>=90){
     ji=4.0;                                                                                        
  }
  else if((s[t])<=89&&(s[t])>=85){
	  ji=3.7;
  }
else if((s[t])<=84&&(s[t])>=82){
     ji=3.3;
  }
else if((s[t])<=81&&(s[t])>=78){
     ji=3.0;
  }
else if((s[t])<=77&&(s[t])>=75){
     ji=2.7;
  }
else if((s[t])<=74&&(s[t])>=72){
     ji=2.3;
  }
else if((s[t])<=71&&(s[t])>=68){
     ji=2.0;
  }
else if((s[t])<=67&&(s[t])>=64){
     ji=1.5;
  }
else if((s[t])<=63&&(s[t])>=60){
     ji=1.0;
  }
else{
     ji=0.0;
  }
j[t]=x[t]*ji;
  }
for(t=0;t<n;t++){
xuefen=xuefen+(x[t]); 
jidian=jidian+(j[t]);
}
gpa=jidian/xuefen;
printf("%.2f",gpa);
   return 0;
}
void main()
{
	int n,i;
	scanf("%d\n",&n);
	int a[10],b[10];
	double c[10];
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
	}
	printf("\n");
	for(i=0;i<n;i++)
	{
		scanf("%d",&b[i]);
	}
	for(i=0;i<n;i++)
	{
		if(b[i]<60)
			c[i]=0;
		else if(b[i]<=63&&b[i]>=60)
			c[i]=1.0;
		else if(b[i]<=67&&b[i]>=64)
			c[i]=1.5;
		else if(b[i]<=71&&b[i]>=68)
			c[i]=2.0;
		else if(b[i]<=74&&b[i]>=72)
			c[i]=2.3;
		else if(b[i]<=77&&b[i]>=75)
			c[i]=2.7;
		else if(b[i]<=81&&b[i]>=78)
			c[i]=3.0;
		else if(b[i]<=84&&b[i]>=82)
			c[i]=3.3;
		else if(b[i]<=89&&b[i]>=85)
			c[i]=3.7;
		else
			c[i]=4.0;
	}
	double GPA,sum=0,score=0;
	for(i=0;i<n;i++)
	{
		sum=sum+c[i]*a[i];
		score=score+a[i];
	}
	GPA=sum/(double)score;
	printf("%.2f",GPA);
}
void main()
{
	int a,b,i,n,p=0;
	scanf("%d",&n);
	int x[10];
	float y[10],s=0,GPA;
	for(i=1;i<=n;i++)
	{
	scanf("%d",&a);
	 x[i]=a;
	}
	    for(i=1;i<=n;i++)
		{	scanf("%d",&b);
	    if(b>=90)
			y[i]=4.0;
		else if(b>=85)
			y[i]=3.7;
			else if(b>82)
			y[i]=3.3;
			else if(b>=78)
			y[i]=3.0;
			else if(b>=75)
			y[i]=2.7;
			else if(b>=72)
			y[i]=2.3;
			else if(b>=68)
			y[i]=2.0;
			else if(b>=64)
			y[i]=1.5;
			else if(b>=60)
			y[i]=1.0;
			else y[i]=0;
		}
	for(i=1;i<=n;i++)
	{
	     s=s+y[i]*x[i];
         p=p+x[i];
	}
GPA=s/p;
printf("%.2f",GPA);
}
void main()
{
	int n,i;
	int a[2][10],c=0;
	double b[10];
	double m=0;
	scanf("%d",&n);
for(i=0;i<n;i++)
{
	scanf("%d",&a[0][i]);
}
for(i=0;i<n;i++)
{
c=c+a[0][i];
}
for(i=0;i<n;i++)
{
	scanf("%d",&a[1][i]);
    if(a[1][i]>=90&&a[1][i]<=100)
        b[i]=4.0;
	if(a[1][i]>=85&&a[1][i]<=89)
		b[i]=3.7;
	if(a[1][i]>=82&&a[1][i]<=84)
		b[i]=3.3;
	if(a[1][i]>=78&&a[1][i]<=81)
		b[i]=3.0;
	if(a[1][i]>=75&&a[1][i]<=77)
		b[i]=2.7;
	if(a[1][i]>=72&&a[1][i]<=74)
		b[i]=2.3;
	if(a[1][i]>=68&&a[1][i]<=71)
		b[i]=2.0;
	if(a[1][i]>=64&&a[1][i]<=67)
		b[i]=1.5;
    if(a[1][i]>=60&&a[1][i]<=63)
		b[i]=1.0;
	if(a[1][i]<60)
		b[i]=0;
}
for(i=0;i<n;i++)
{
m=m+a[0][i]*b[i]/c;
}
printf("%.2f",m);
}
int main(){
    int n,i,x=0;
    int a[10],b[10];
    float c[10],y=0.0,GPA;
    scanf("%d",&n);
    for(i=0;i<n;i++){
       scanf("%d ",&a[i]);
       x+=a[i];
    }
    for(i=0;i<n;i++){
       if(i<n-1){
          scanf("%d ", &b[i]);
       }else 
          scanf("%d", &b[i]);
    }
    for(i=0;i<n;i++){
       if(b[i]<=60){
          c[i]=0;
       }else if(b[i]<=63){
          c[i]=1.0;
       }else if(b[i]<=67){
          c[i]=1.5;
       }else if(b[i]<=71){
          c[i]=2.0;
       }else if(b[i]<=74){
          c[i]=2.3;
       }else if(b[i]<=77){
          c[i]=2.7;
       }else if(b[i]<=81){
          c[i]=3.0;
       }else if(b[i]<=84){
          c[i]=3.3;
       }else if(b[i]<=89){
          c[i]=3.7;
       }else 
          c[i]=4.0;
       y+=(c[i])*(a[i]);
    }
    GPA=y/x;
    printf("%.2f",GPA);
    return 0;
}
int main(){
int i,n,point[10],goal;
float f,num,gpa;
float c=0,d=0;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d ",&point[i]);
c=c+point[i];
}
for(i=0;i<n;i++){
scanf("%d",&goal);
if(goal>=90&&goal<=100) f=4.0;
if(goal>=85&&goal<=89) f=3.7;
if(goal>=82&&goal<=84) f=3.3;
if(goal>=78&&goal<=81) f=3.0;
if(goal>=75&&goal<=77) f=2.7;
if(goal>=72&&goal<=74) f=2.3;
if(goal>=68&&goal<=71) f=2.0;
if(goal>=64&&goal<=67) f=1.5;
if(goal>=60&&goal<=63) f=1.0;
if(goal<60) f=0;
num=point[i]*f;
d=d+num;

}
gpa=(double)(d/c);
printf("%.2f",gpa);
}
int main()
{
 	int i,m=0,n;
 	int a[11]={0},b[11]={0};
	float GPA=0;
	float c[11]={0},d[11]={0};
 	cin>>n;
 	for (i=1;i<=n;i++)
	{
	 	cin>>a[i];
	}	 
	for (i=1;i<=n;i++)
	{
	 	cin>>b[i];
		if (b[i]>=90 && b[i]<101) c[i]=4.0;
		if (b[i]>=85 && b[i]<90) c[i]=3.7;
		if (b[i]>=82 && b[i]<85) c[i]=3.3;
		if (b[i]>=78 && b[i]<82) c[i]=3.0;
		if (b[i]>=75 && b[i]<78) c[i]=2.7;
		if (b[i]>=72 && b[i]<75) c[i]=2.3;
		if (b[i]>=68 && b[i]<72) c[i]=2.0;
		if (b[i]>=64 && b[i]<68) c[i]=1.5;
		if (b[i]>=60 && b[i]<64) c[i]=1.0;
		if (b[i]>=0 && b[i]<60) c[i]=0.0;
	}	 
	for (i=1;i<=n;i++)
	{
	 d[i]= a[i] * c[i];
	 GPA+=d[i];m=m+a[i];
	}	 
	printf("%.2f",GPA/m);
	
}
int main()
{
	int n,i;
	float zong;
	float sump=0.0;
	int sumxuefen=0;
	float p[10];
	int g[10];
	int xuefen[10];
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d",&xuefen[i]);
	for(i=0;i<n;i++){
		scanf("%d",&g[i]);
		if(g[i]>=90)
			p[i]=4.0*xuefen[i];
		else if(g[i]>=85)
			p[i]=3.7*xuefen[i];
		else if(g[i]>=82)
			p[i]=3.3*xuefen[i];
		else if(g[i]>=78)
			p[i]=3.0*xuefen[i];
		else if(g[i]>=75)
			p[i]=2.7*xuefen[i];
		else if(g[i]>=72)
			p[i]=2.3*xuefen[i];
		else if(g[i]>=68)
			p[i]=2.0*xuefen[i];
		else if(g[i]>=64)
			p[i]=1.5*xuefen[i];
		else if(g[i]>=60)
			p[i]=1.0*xuefen[i];
		else p[i]=0.0;
	}
	for(i=0;i<n;i++){
		sump+=p[i];
		sumxuefen+=xuefen[i];
	}
	zong=(float)sump/sumxuefen;
	printf("%.2f",zong);
	return 0;
}
int main(){
	int k,x[10],f,sum=0,m;
	float zong,j[10],he=0;
	scanf("%d",&k);
	for(m=0;m<k;m++){
	scanf("%d",&(x[m]));
    sum+=x[m];
	}
	for(m=0;m<k;m++){
	scanf("%d",&f);
	if(f>=90&&f<=100){
	j[m]=4.0;
	}
	else if(f>=85&&f<=89){
	j[m]=3.7;
	}
    else if(f>=82&&f<=84){
	j[m]=3.3;
	}
    else if(f>=78&&f<=81){
	j[m]=3.0;
	}
    else if(f>=75&&f<=77){
	j[m]=2.7;
	}
    else if(f>=72&&f<=74){
	j[m]=2.3;
	}
    else if(f>=68&&f<=71){
	j[m]=2.0;
	}
    else if(f>=64&&f<=67){
	j[m]=1.5;
	}
    else if(f>=60&&f<=63){
	j[m]=1.0;
	}
    else if(f<60){
	j[m]=0;
	}
	}
	for(m=0;m<k;m++){
    he+=j[m]*x[m];
	}
    zong=he/sum;
    printf("%.2f\n",zong);
	return 0;
}
int main(){
	int n;
	scanf("%d",&n);
	int sz1[9];
	double c=0,GPA,sz2[9],sz[9];
	int i,sum=0;
	for(i=0;i<n;i++){
		scanf("%d",&(sz1[i]));
	}
	for(i=0;i<n;i++){
	sum+=sz1[i];
	}
	for(i=0;i<n;i++){
	sz[i]=0;
	}

	for(i=0;i<n;i++){
	scanf("%lf",&sz2[i]);
	}
	for(i=0;i<n;i++){

	if(90<=sz2[i]&&sz2[i]<=100)
	{
		sz[i]=4.0;
	}
	if(89>=sz2[i]&&sz2[i]>=85)
    {
	sz[i]=3.7;
	}
	if(84>=sz2[i]&&sz2[i]>=82){
		sz[i]=3.3;
	}
    if(81>=sz2[i]&&sz2[i]>=78){
		sz[i]=3.0;
	}
    if(77>=sz2[i]&&sz2[i]>=75){
		sz[i]=2.7;
	}
    if(74>=sz2[i]&&sz2[i]>=72){
		sz[i]=2.3;
	}
    if(71>=sz2[i]&&sz2[i]>=68){
		sz[i]=2.0;
	}
    if(67>=sz2[i]&&sz2[i]>=64){
		sz[i]=1.5;
	}
    if(63>=sz2[i]&&sz2[i]>=60){
		sz[i]=1.0;
	}
    if(sz2[i]<60){
		sz[i]=0.0;
	}
  	}
	for(i=0;i<n;i++){
		c+=sz1[i]*sz[i];
	}
	GPA=c/sum;
	printf("%.2lf",GPA);
	return 0;
}
int n,a[15];
double ck(int x)
{
	if(x>=90) return 4.;
	if(x>=85) return 3.7;
	if(x>=82) return 3.3;
	if(x>=78) return 3.;
	if(x>=75) return 2.7;
	if(x>=72) return 2.3;
	if(x>=68) return 2.;
	if(x>=64) return 1.5;
	if(x>=60) return 1.;
	return 0;
}
int main()
{
	while(scanf("%d",&n)==1)
	{
		int sum1=0;
		double sum2=0;
		for(int i=0;i<n;i++) 
		{
			scanf("%d",a+i);
			sum1+=a[i];
		}
		for(int i=0;i<n;i++)
		{
			int tmp;
			scanf("%d",&tmp);
			sum2+=ck(tmp)*a[i];
		}
		
		printf("%.2f\n",sum2/sum1);
	}
	return 0;
}
int main(){
    int i,n;
    int sz[10];
    double mark[10];
    scanf("%d",&n);
    for(i=0;i<n;i++){
        scanf("%d ",&sz[i]);
    }
    for(i=0;i<n;i++){
        scanf("%lf ",&mark[i]);
    }
    for(i=0;i<n;i++){
        if(mark[i]>=90){
            mark[i]=4.0;
            }else if(
            85<=mark[i]&&mark[i]<=89){
                mark[i]=3.7;
            }else if(
            82<=mark[i]&&mark[i]<=84){
                mark[i]=3.3;
            }else if(
            78<=mark[i]&&mark[i]<=81){
                mark[i]=3.0;
            }else if(
            75<=mark[i]&&mark[i]<=77){
                mark[i]=2.7;
            }else if(
            72<=mark[i]&&mark[i]<=74){
                mark[i]=2.3;
            }else if(
            68<=mark[i]&&mark[i]<=71){
                mark[i]=2.0;
            }else if(
            64<=mark[i]&&mark[i]<=67){
                mark[i]=1.5;
            }else if(
            60<=mark[i]&&mark[i]<=63){
                mark[i]=1.0;
            }else if(
            mark[i]<60){
                mark[i]=0;
            }
        
    }
    double sum[10];
    for(i=0;i<n;i++){
        sum[i]=mark[i]*sz[i];
    }
    double sumGPA=0,xuefen=0;
    for(i=0;i<n;i++){
        sumGPA+=sum[i];
    }
    for(i=0;i<n;i++){
        xuefen+=sz[i];
    }
    double result;
    result=sumGPA/xuefen;
    printf("%.2lf",result);
    return 0;
}
int main(){
	int n,defen[10],i,zongxuefen=0,xuefen[10];
	double result,sum=0,jidian[10];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&xuefen[i]);
		zongxuefen+=xuefen[i];
	}
	for(i=0;i<n;i++){
		scanf("%d",&defen[i]);
		if(defen[i]>=90){
			jidian[i]=4.0;
		}
		else if(defen[i]>=85){
			jidian[i]=3.7;
		}
		else if(defen[i]>=82){
			jidian[i]=3.3;
		}
		else if(defen[i]>=78){
			jidian[i]=3.0;
		}
		else if(defen[i]>=75){
			jidian[i]=2.7;
		}
		else if(defen[i]>=72){
			jidian[i]=2.3;
		}
		else if(defen[i]>=68){
			jidian[i]=2.0;
		}
		else if(defen[i]>=64){
			jidian[i]=1.5;
		}
		else if(defen[i]>=60){
			jidian[i]=1.0;
		}
		else{
			jidian[i]=0;
		}
	}
		for(i=0;i<n;i++){
			sum+=jidian[i]*xuefen[i];
		}
        result=sum/zongxuefen;
		printf("%.2lf",result);
		return 0;
	}
int main(){
    int n;
    int xf[11],df[11];
    double zj=0;
    double GPA=0;
    double zxf=0;
    scanf("%d",&n);
    for(int i=0;i<n;i++){
        scanf("%d",&xf[i]);
    }
    for(int i=0;i<n;i++){
        scanf("%d",&df[i]);
    }
    for(int i=0;i<n;i++){
        if(df[i]>=90&&df[i]<=100)zj=zj+4.0*xf[i];
        else if(df[i]>=85&&df[i]<=89)zj=zj+3.7*xf[i];
        else if(df[i]>=82&&df[i]<=84)zj=zj+3.3*xf[i];
        else if(df[i]>=78&&df[i]<=81)zj=zj+3.0*xf[i];
        else if(df[i]>=75&&df[i]<=77)zj=zj+2.7*xf[i];
        else if(df[i]>=72&&df[i]<=74)zj=zj+2.3*xf[i];
        else if(df[i]>=68&&df[i]<=71)zj=zj+2.0*xf[i];
        else if(df[i]>=64&&df[i]<=67)zj=zj+1.5*xf[i];
        else if(df[i]>=60&&df[i]<=63)zj=zj+1.0*xf[i];
        else if(df[i]<60)zj=zj;
        
    }
    for(int i=0;i<n;i++){
        zxf=zxf+xf[i];
    }
    GPA=zj/zxf;
    printf("%.2lf",GPA);
}
void main()
{
	int i,a[10],n,h,b[10];
	double H,c[10],GPA;
	h=0;
	H=0;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
		h=h+a[i];
	}
			
	for(i=0;i<n;i++)
	{
		scanf("%d",&b[i]);

		if(b[i]<=100&&b[i]>=90)
		    c[i]=4.0;
        if(b[i]<=89&&b[i]>=85)
			c[i]=3.7;
		if(b[i]<=84&&b[i]>=82)
			c[i]=3.3;
		if(b[i]<=81&&b[i]>=78)
			c[i]=3.0;
		if(b[i]<=77&&b[i]>=75)
			c[i]=2.7;
		if(b[i]<=74&&b[i]>=72)
			c[i]=2.3;
		if(b[i]<=71&&b[i]>=68)
			c[i]=2.0;
		if(b[i]<=67&&b[i]>=64)
			c[i]=1.5;
		if(b[i]<=63&&b[i]>=60)
			c[i]=1.0;
		if(b[i]<=59&&b[i]>=0)
			c[i]=0;
	}
	for(i=0;i<n;i++)
		H=H+a[i]*c[i];
	GPA=H/h;
	printf("%.2lf",GPA);
}
int main()
{
	int n;
	double x, y, sc = 0;
	double sum = 0, gpa;
	double course[12], cre[12];
	cin >> n;
	for(int i = 0; i < n; i++)
	{
		cin >>x;
		cre[i] = x;
		sc += x;
	}
	for(int i = 0; i < n; i++)
	{
		cin >> y;
		if(y >= 90 && y <=100)	
			course[i] = 4.0;
		if(y >= 85 && y <=89)	
			course[i] = 3.7;
		if(y >= 82 && y <=84)	
			course[i] = 3.3;
		if(y >= 78 && y <=81)	
			course[i] = 3.0;
		if(y >= 75 && y <=77)	
			course[i] = 2.7;
		if(y >= 72 && y <=74)	
			course[i] = 2.3;
		if(y >= 68 && y <=71)	
			course[i] = 2.0;
		if(y >= 64 && y <=67)	
			course[i] = 1.5;
		if(y >= 60 && y <=63)	
			course[i] = 1.0;
		if(y < 60)	
			course[i] = 0.0;
	}
	for(int i = 0; i < n; i++)
		sum += course[i] * cre[i];
	gpa = sum / sc;
	printf("%.2f\n", gpa);
	return 0;	
}
int main()
{
	int n,num1[10],i,num2[10];
	double sum[10],sum1;
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d",&num1[i]);
	for(i=0;i<n;i++)
	{
		scanf("%d",&num2[i]);
		if(num2[i]<60)
			sum[i]=0.0;
		else if(num2[i]<=63)
			sum[i]=1.0;
		else if(num2[i]<=67)
			sum[i]=1.5;
		else if(num2[i]<=71)
			sum[i]=2.0;
		else if(num2[i]<=74)
			sum[i]=2.3;
		else if(num2[i]<=77)
			sum[i]=2.7;
		else if(num2[i]<=81)
			sum[i]=3.0;
		else if(num2[i]<=84)
			sum[i]=3.3;
		else if(num2[i]<=89)
			sum[i]=3.7;
		else if(num2[i]<=100)
			sum[i]=4.0;
	}
	double sum2=0;
	sum1=0;
	for(i=0;i<n;i++)
	{
		sum1=(double)num1[i]+sum1;
		sum2=(double)num1[i]*sum[i]+sum2;
	}
	sum2=(double)sum2/sum1;
	printf("%.2f",sum2);
}
int main()
{
	int n,i,j;
	float sza[10],szb[10],szc[10],szd[10];
	float x=0,y=0,z;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%f",&(sza[i]));
	}
	for(i=0;i<n;i++)
	{
		scanf("%f",&(szb[i]));
	}
for(i=0;i<n;i++)
{
	if(szb[i]<=100&&szb[i]>=90)
	{
szc[i]=4.0;
	}
	else if(szb[i]<=89&&szb[i]>=85)
	{
		szc[i]=3.7;
	}
else if(szb[i]<=84&&szb[i]>=82)
	{
		szc[i]=3.3;
	}
else if(szb[i]<=81&&szb[i]>=78)
	{
		szc[i]=3.0;
	}
else if(szb[i]<=77&&szb[i]>=75)
	{
		szc[i]=2.7;
	}
else if(szb[i]<=74&&szb[i]>=72)
	{
		szc[i]=2.3;
	}
else if(szb[i]<=71&&szb[i]>=68)
	{
		szc[i]=2.0;
	}
else if(szb[i]<=67&&szb[i]>=64)
	{
		szc[i]=1.5;
	}
else if(szb[i]<=63&&szb[i]>=61)
	{
		szc[i]=1.0;
	}
else if(szb[i]<=60)
	{
		szc[i]=0;
	}
}
for(i=0;i<n;i++)
{
	szd[i]=sza[i]*szc[i];
}
for(i=0;i<n;i++)
{
	x+=szd[i];
	y+=sza[i];
}
z=x/y;
printf("%.2f",z);
return 0;
}
int main()
{
	int n,i,xfh=0;
    int xf[9],df[9];
	double GPA,gpa[9],xfjd[9],jdh=0;
    scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&xf[i]);
		xfh+=xf[i];
	}
	for(i=0;i<n;i++){
	scanf("%d",&df[i]);
	if(df[i]>=90){gpa[i]=4.0;}
	else if(85<=df[i]&&df[i]<=90){gpa[i]=3.7;}
	else if(82<=df[i]&&df[i]<=84){gpa[i]=3.3;}
	else if(78<=df[i]&&df[i]<=81){gpa[i]=3.0;}
	else if(72<=df[i]&&df[i]<=74){gpa[i]=2.3;}
	else if(68<=df[i]&&df[i]<=71){gpa[i]=2.0;}
	else if(64<=df[i]&&df[i]<=67){gpa[i]=1.5;}
	else if(60<=df[i]&&df[i]<=63){gpa[i]=1.0;}
    else{gpa[i]=0;}
	xfjd[i]=xf[i]*gpa[i];
	jdh+=xfjd[i];
	}
	GPA=jdh/xfh;
    printf("%.2f",GPA);
	return 0;
}
int main()
{
    int n,i;
    float s,k=0,l=0;
    cin>>n;
    int a[n],b[n];
    float c[n];
    for(i=0;i<n;i++)
    cin>>a[i];
    for(i=0;i<n;i++)
    {
                    cin>>b[i];
                    if(b[i]>=90&&b[i]<=100)
                    c[i]=4;
                    else if(b[i]>=85&&b[i]<=89)
                    c[i]=3.7;
                    else if(b[i]>=82&&b[i]<=84)
                    c[i]=3.3;
                    else if(b[i]>=78&&b[i]<=81)
                    c[i]=3.0;
                    else if(b[i]>=75&&b[i]<=77)
                    c[i]=2.7;
                    else if(b[i]>=72&&b[i]<=74)
                    c[i]=2.3;
                    else if(b[i]>=68&&b[i]<=71)
                    c[i]=2.0;
                    else if(b[i]>=64&&b[i]<=67)
                    c[i]=1.5;
                    else if(b[i]>=60&&b[i]<=63)
                    c[i]=1.0;
                    else c[i]=0;
                    }
                    for(i=0;i<n;i++)
                    {
                                    k=k+a[i]*c[i];
                                    l=l+a[i];
                                    }
                                    s=(float)k/(float)l;
                                    cout<<fixed<<setprecision(2)<<s<<endl;
                                    return 0;
                                    }
void main()
{
	int n,i,j,m[10];
	double y[10],z[10],b,GPA,x[10],a;
	scanf("%d",&n);
	a=0.0;
	b=0.0;
	GPA=0.0;
	for(i=0;i<n;i++)
	{
		scanf("%d",&m[i]);
		a=a+m[i];
	}	
	for(i=0;i<n;i++)
    {
		scanf("%lf",&x[i]);
	}
	for(i=0;i<n;i++)
	{
		if(x[i]<=100 && x[i]>=90)
		{
			y[i]=4.00;
		}
		else if(x[i]<60)
		{
			y[i]=0.00;
		}
	    else if(x[i]<=89&&x[i]>=85)
			 {
				 y[i]=3.70;
			 }
		else if(x[i]<=84&&x[i]>=82)
				 {
					 y[i]=3.30;
				 }
		else if(x[i]<=81&&x[i]>=78)
					{
						 y[i]=3.00;
                           }
        else if(x[i]<=77&&x[i]>=75)
				        {
							   y[i]=2.70;
			                }
        else if(x[i]<=74&&x[i]>=72)
                         {
                                y[i]=2.30;
                      }
        else if(x[i]<=71&&x[i]>=68)
                         {
                                  y[i]=2.00;
                         }
        else if(x[i]<=67&&x[i]>=64)
                        {
                                 y[i]=1.50;
                           }
        else if(x[i]<=63&&x[i]>=60)
                     {
                          y[i]=1.00;
                      }
	}
	for(i=0;i<n;i++)
	{
           z[i]=y[i]*m[i];
	       b=b+z[i];
	}
	GPA=(double)b/(double)a;
	printf("%.2f\n",GPA);
}
int main(int argc, char* argv[])
{
	int n,i,xuefen[10],chengji[10],sum1=0;
    scanf("%d",&n);
	for(i=0;i<n;i++){
	     scanf("%d",&xuefen[i]);
		 sum1=sum1+xuefen[i];
	}
	for(i=0;i<n;i++){
		scanf("%d",&chengji[i]);
	}
	float jidian[10];
	for(i=0;i<n;i++){
	if(chengji[i]<=100&&chengji[i]>=90) jidian[i]=4.0;
	if(chengji[i]<=89&&chengji[i]>=85) jidian[i]=3.7;
	if(chengji[i]<=84&&chengji[i]>=82) jidian[i]=3.3;
	if(chengji[i]<=81&&chengji[i]>=78) jidian[i]=3.0;
    if(chengji[i]<=77&&chengji[i]>=75) jidian[i]=2.7;
    if(chengji[i]<=74&&chengji[i]>=72) jidian[i]=2.3;
	if(chengji[i]<=71&&chengji[i]>=68) jidian[i]=2.0;
    if(chengji[i]<=67&&chengji[i]>=64) jidian[i]=1.5;
    if(chengji[i]<=63&&chengji[i]>=60) jidian[i]=1.0;
    if(chengji[i]<=59) jidian[i]=0;
	}
	float xuefenjidian[10],sum2=0;
	int j;
	for(j=0;j<i;j++){
		xuefenjidian[j]=jidian[j]*xuefen[j];
		sum2=sum2+xuefenjidian[j];
	}
	float GPA;
	GPA=sum2/sum1;
	printf("%.2f",GPA);
     return 0;
}
/*
?? - 1017 ????   

?? ????05  
?? 
?????????????????????GPA????????????????????????????????? 
?????????? 
???? ?? 
90-100 4.0 
85-89  3.7 
82-84  3.3 
78-81  3.0 
75-77  2.7 
72-74  2.3 
68-71  2.0 
64-67  1.5 
60-63  1.0 
60?? 0 
1??????????=????*???? 
2?????=????????/???????? 
????????????A??????GPA?? 

 
???? 
??? ?????n?n<10?? 
??? ???????????????????? 
??? ?????????? 
?????????????? 
 
???? 
??????????????????2?????printf("%.2f",GPA);? 
*/

int main()
{
	int n,xuefen[10],defen[10],i=0;
	float GPA=0,gpa=0,fen=0;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&xuefen[i]);
	}
    for(i=0;i<n;i++)
	{
		scanf("%d",&defen[i]);
	}
    for(i=0;i<n;i++)
	{
		fen+=xuefen[i];
		if(defen[i]>=90)
		{
			gpa+=4.0*xuefen[i];
		}
		else if(defen[i]>=85&&defen[i]<=89)
		{
			gpa+=3.7*xuefen[i];
		}
		else if(defen[i]>=82&&defen[i]<=84)
		{
			gpa+=3.3*xuefen[i];
		}
		else if(defen[i]>=78&&defen[i]<=81)
		{
			gpa+=3.0*xuefen[i];
		}
		else if(defen[i]>=75&&defen[i]<=77)
		{
			gpa+=2.7*xuefen[i];
		}
		else if(defen[i]>=72&&defen[i]<=74)
		{
			gpa+=2.3*xuefen[i];
		}
		else if(defen[i]>=68&&defen[i]<=71)
		{
			gpa+=2.0*xuefen[i];
		}
		else if(defen[i]>=64&&defen[i]<=67)
		{
			gpa+=1.5*xuefen[i];
		}
		else if(defen[i]>=60&&defen[i]<=63)
		{
			gpa+=1.0*xuefen[i];
		}
		
	}
	GPA=gpa/fen;
	printf("%.2f",GPA);
}
int main(){
int n,a=0;
double s=0;
float GPA;
scanf("%d",&n);
int x[n],y[n];
for(int i=0;i<n;i++){
    scanf("%d",&x[i]);
    a=a+x[i];
}
for(int i=0;i<n;i++){
    scanf("%d",&y[i]);
}
for(int i=0;i<n;i++){
    if(y[i]>=90&&y[i]<=100){
        s=s+4.0*x[i];
    }else if(y[i]>=85&&y[i]<=89){
        s=s+3.7*x[i];
    }else if(y[i]>=82&&y[i]<=84){
        s=s+3.3*x[i];
    }else if(y[i]>=78&&y[i]<=81){
        s=s+3.0*x[i];
    }else if(y[i]>=75&&y[i]<=77){
        s=s+2.7*x[i];
    }else if(y[i]>=72&&y[i]<=74){
        s=s+2.3*x[i];
    }else if(y[i]>=68&&y[i]<=71){
        s=s+2.0*x[i];
    }else if(y[i]>=64&&y[i]<=67){
        s=s+1.5*x[i];
    }else if(y[i]>=60&&y[i]<=63){
        s=s+1.0*x[i];
    }
}
    GPA=s/a;
    printf("%.2f",GPA);
    return 0;
}