semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main(){
	int  n;
	int x=0;
	float y=0;
    int sz1[10];
	int sz2[10];
	float sz3[10];
	scanf("%d",&n);
	int i;
	for(i=0;i<n;i++){
		scanf("%d",&sz2[i]);
	}
	for(i=0;i<n;i++){
	x+=sz2[i];
	}
	for(i=0;i<n;i++){
	scanf("%d",&sz1[i]);
	if(sz1[i]>=90&&sz1[i]<=100){
	sz3[i]=4.0*sz2[i];
	}else if(sz1[i]>=85&&sz1[i]<=89){
	sz3[i]=3.7*sz2[i];
	}else if(sz1[i]>=82&&sz1[i]<=84){
	sz3[i]=3.3*sz2[i];
	}else if(sz1[i]>=78&&sz1[i]<=81){
	sz3[i]=3.0*sz2[i];
	}else if(sz1[i]>=75&&sz1[i]<=77){
	sz3[i]=2.7*sz2[i];
	}else if(sz1[i]>=72&&sz1[i]<=74){
	sz3[i]=2.3*sz2[i];
	}else if(sz1[i]>=68&&sz1[i]<=71){
	sz3[i]=2.0*sz2[i];
	}else if(sz1[i]>=64&&sz1[i]<=67){
	sz3[i]=1.5*sz2[i];
	}else if(sz1[i]>=60&&sz1[i]<=63){
	sz3[i]=1.0*sz2[i];
	}else if(sz1[i]<60){
	sz3[i]=0.0*sz2[i];
	}
	}
	for(i=0;i<n;i++){
	y+=sz3[i];
	}
	printf("%.2f",y/x);
	return 0;
	}
void main()
{
	int n,i,j,d,c,e=0,a[9];
	double g,b[9],f=0;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{ 
		scanf("%d",&c);
	a[i]=c;
	}
	// printf("\n");
	for(j=0;j<n;j++)
	{
		scanf("%d",&d);
		if(d>=90)
			b[j]=4;
		else if(d>=85)
	b[j]=3.7;
else if(d>=82)
	b[j]=3.3;
else if(d>=78)
	b[j]=3.0;
else if(d>=75)
	b[j]=2.7;
else if(d>=72)
	b[j]=2.3;
else if(d>=68)
	b[j]=2.0;
else if(d>=64)
	b[j]=1.5;
else if(d>=60)
	b[j]=1.0;
else b[j]=0;
	}
	for(i=0;i<n;i++)
		e=e+a[i];
	for(i=0;i<n;i++)
		f=f+a[i]*b[i];
	g=f/e;
	printf("%.2f",g);
}
void main()
{
	int a[10],c=0,i,n;
	float g=0,b;
	scanf("%d\n",&n);
	for (i=0;i<n;i++) {scanf("%d",&a[i]);c=a[i]+c;}
	for (i=0;i<n;i++)
	{
		scanf("%f",&b);
		if(b>=60&&b<64) b=1;
		else if(b>63&&b<68) b=1.5;
		else if(b>67&&b<72) b=2;
		else if(b>71&&b<75) b=2.3;
		else if(b>74&&b<78) b=2.7;
		else if(b>77&&b<82) b=3.0;
		else if(b>81&&b<85) b=3.3;
		else if(b>84&&b<90) b=3.7;
		else if(b>89&&b<=100) b=4;
		else b=0;
		g=g+b*a[i];
	}
	g=g/c;
	printf("%.2f\n",g);
}
int main(){
    int n,s=0;
    float j=0,z;
    scanf("%d\n",&n);
    int xf[n],sf[n];
    for(int i=0;i<n;i++){
        scanf("%d",&xf[i]);
    }
    for(int i=0;i<n;i++){
        scanf("%d",&sf[i]);
    }
    for(int i=0;i<n;i++){
        s=s+xf[i];
    }
    for(int i=0;i<n;i++){
        if(89<sf[i]&&sf[i]<=100){
            j=j+4.0*xf[i];
        }
        else if(84<sf[i]&&sf[i]<90){
            j=j+3.7*xf[i];
        }
        else if(81<sf[i]&&sf[i]<85){
            j=j+3.3*xf[i];
        }
        else if(77<sf[i]&&sf[i]<82){
            j=j+3.0*xf[i];
        }
        else if(74<sf[i]&&sf[i]<78){
            j=j+2.7*xf[i];
        }
        else if(71<sf[i]&&sf[i]<75){
            j=j+2.3*xf[i];
        }
        else if(67<sf[i]&&sf[i]<72){
            j=j+2.0*xf[i];
        }
        else if(63<sf[i]&&sf[i]<68){
            j=j+1.5*xf[i];
        }
        else if(59<sf[i]&&sf[i]<64){
            j=j+1.0*xf[i];
        }
        else if(sf[i]<60){
            j=j;
        }
    }
    z=j/s;
    printf("%.2f",z);
    return 0;
}
int main()
{
    int i,j,k,n;
	scanf("%d",&n);
	int a[9]={0,0,0,0,0,0,0,0,0};
	for(i=0;i<n;i++)
	{scanf("%d",&a[i]);}
	int b[9]={0,0,0,0,0,0,0,0,0};
	for(j=0;j<n;j++)
	{scanf("%d",&b[j]);}
	double c[9]={0,0,0,0,0,0,0,0,0};
	for(k=0;k<n;k++)
	{if(b[k]<=100&&b[k]>=90)
	    c[k]=4.0*a[k];
	else 
		if(b[k]<=89&&b[k]>=85)
			c[k]=3.7*a[k];
		else
		    if(b[k]<=84&&b[k]>=82)
			   c[k]=3.3*a[k];
	        else 
	  	        if(b[k]<=81&&b[k]>=78)
			       c[k]=3.0*a[k];

	            else 
		            if(b[k]<=77&&b[k]>=75)
		 	           c[k]=2.7*a[k];
	                  else 
	 	                if(b[k]<=74&&b[k]>=72)
		                	c[k]=2.3*a[k];

	                     else 
		                      if(b[k]<=71&&b[k]>=68)
		                     	c[k]=2.0*a[k];

	                            else 
		                           if(b[k]<=67&&b[k]>=64)
			                          c[k]=1.5*a[k];
	                                 else 
		                                 if(b[k]<=63&&b[k]>=60)
			                               c[k]=1.0*a[k];
										 else
											 if(b[k]<60)
												 c[k]=0;
	}
	double q=0,w=0,x;
	int u,v;
	for(u=0;u<n;u++)
	{q=q+c[u];}
	for(v=0;v<n;v++)
	{w=w+a[v];}
	x=q/w;
	printf("%.2lf",x);
	

	return 0;
}
int main()
{
   int n,i,j,k,sum1=0;
   scanf("%d",&n);
   int a[n],b[n];
   float c[n],d[n],sum2=0;
   for(i=0;i<n;i++){
       scanf("%d",&a[i]);
       sum1 += a[i];
   }
   for(j=0;j<n;j++){
       scanf("%d",&b[j]);
   }
   for(k=0;k<n;k++){
      if(b[k]>=90 && b[k]<=100)
          c[k]=4.0;
      else if(b[k]>=85&& b[k]<=89)
          c[k]=3.7;
      else if(b[k]>=82 && b[k]<=84)
          c[k]=3.3;
      else if(b[k]>=78 && b[k]<=81)
          c[k]=3.0;
      else if(b[k]>=75 && b[k]<=77)
          c[k]=2.7;
      else if(b[k]>=72 && b[k]<=74)
          c[k]=2.3;      
      else if(b[k]>=68 && b[k]<=71)
          c[k]=2.0; 
      else if(b[k]>=64 && b[k]<=67)
          c[k]=1.5; 
      else if(b[k]>=60 && b[k]<=63)
          c[k]=1.0; 
      else
          c[k]=0;              
       d[k]=a[k]*c[k];
      sum2 += d[k];
   }
   printf("%.2f",sum2/sum1);
   return 0;
}
int main(){
	int n;
	int i;
	float c=0,f=0,d,e;
	float GPA;
	scanf("%d",&n);
	int p[10];
	int q[10];
	for( i=0;i<n;i++){
		scanf("%d",&(p[i]));
		c+=p[i];
	}for( i=0;i<n;i++){
        scanf("%d",&(q[i]));
		d=q[i];
		if(d>=90&&d<=100){
	        e=4.0;
		}else if(d>=85&&d<=89){
			e=3.7;
		}else if(d>=82&&d<=84){
            e=3.3;
		}else if(d>=78&&d<=81){
			e=3.0;
		}else if(d>=75&&d<=77){
			e=2.7;
		}else if(d>=72&&d<=74){
			e=2.3;
		}else if(d>=68&&d<=71){
			e=2.0;
		}else if(d>=64&&d<=67){
			e=1.5;
		}else if(d>=60&&d<=63){
			e=1.0;
		}else if(d<60){
			e=0;
		}
		f+=e*p[i];
	}printf("%.2f",GPA=f/c);
	return 0;
}
int main()
{
	int n,x[9]={0},c[9]={0},sumx=0;
	float zjd=0;
	float xj[9]={0},sum=0;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		scanf("%d",&x[i]);
		sumx+=x[i];
	};
	for(int k=0;k<n;k++){
		scanf("%d",&c[k]);
	};
	for(int j=0;j<n;j++){
		if(90<=c[j]&&c[j]<=100){
			xj[j]=4.0;
		};
		if(85<=c[j]&&c[j]<=89){
			xj[j]=3.7;
		};
		if(82<=c[j]&&c[j]<=84){
			xj[j]=3.3;
		};
		if(78<=c[j]&&c[j]<=81){
			xj[j]=3.0;
		};
		if(75<=c[j]&&c[j]<=77){
			xj[j]=2.7;
		};
		if(72<=c[j]&&c[j]<=74){
			xj[j]=2.3;
		};
		if(68<=c[j]&&c[j]<=71){
			xj[j]=2.0;
		};
		if(64<=c[j]&&c[j]<=67){
			xj[j]=1.5;
		};
		if(60<=c[j]&&c[j]<=63){
			xj[j]=1.0;
		};
		if(0<=c[j]&&c[j]<=59){
			xj[j]=0;
		};
	};
	for(int m=0;m<n;m++){
		sum+=xj[m]*x[m];
	};
	zjd=sum/sumx;
	printf("%.2lf\n",zjd);
	return 0;
}
void main()
{
	int a[10],b[10];
	double c[10];
	double p=0,q=0,pga;
	int n,i;
	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;
	}
	for(i=0;i<n;i++)
	{
        q=q+(double)a[i];
		p=p+(double)a[i]*c[i];
	}
	pga=p/q;
	printf("%.2lf",pga);
}
int main(){
	double G=0,P=0,k;
	double c[10];
	int a[10],b[10];
	int n;
	scanf ("%d",&n);
	for (int i=1;i<=n;i++){
		scanf ("%d",&a[i]);
	}
	for (int m=1;m<=n;m++){
		scanf ("%d",&b[m]);
	}
	for (int p=1;p<=n;p++){
		if(b[p]>=90&&b[p]<=100){
			c[p]=4.0*a[p];
		}else if(b[p]>=85&&b[p]<=89){
			c[p]=3.7*a[p];
        }else if(b[p]>=82&&b[p]<=84){
			c[p]=3.3*a[p];
		}else if(b[p]>=78&&b[p]<=81){
			c[p]=3.0*a[p];
        }else if(b[p]>=75&&b[p]<=77){
			c[p]=2.7*a[p];
        }else if(b[p]>=72&&b[p]<=74){
			c[p]=2.3*a[p];
        }else if(b[p]>=68&&b[p]<=71){
			c[p]=2.0*a[p];
		}else if(b[p]>=64&&b[p]<=67){
			c[p]=1.5*a[p];
        }else if(b[p]>=60&&b[p]<=63){
			c[p]=1.0*a[p];
		}else{
			c[p]=0;
		}
	}
	for (int q=1;q<=n;q++){
		G=G+c[q];
	}
	for (int x=1;x<=n;x++){
		P=P+a[x];
	}
	k=1.0*G/P;
	printf("%.2lf",k);
	return 0;
}
float ji(int a)
{
	if(a>=90&&a<=100)
	return 4.0;
	else if(a>=85&&a<=89)
	return 3.7;
	else if(a>=82&&a<=84)
	return 3.3;
	else if(a>=78&&a<=81)
	return 3.0;
	else if(a>=75&&a<=77)
	return 2.7;
	else if(a>=72&&a<=74)
	return 2.3;
	else if(a>=68&&a<=71)
	return 2.0;
	else if(a>=64&&a<=67)
	return 1.5;
	else if(a>=60&&a<=63)
	return 1.0;
	else return 0.0;
}
int main()
{
	int n,defen[N],xuefen[N],sum=0,i;
	float jidian[N],GPA=0;//?????????????GPA
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&xuefen[i]);
	    sum+=xuefen[i];
	}
	for(i=0;i<n;i++)
	{
			scanf("%d",&defen[i]);
			jidian[i]=ji(defen[i]);
			GPA=GPA+jidian[i]*xuefen[i];
	}
    GPA=GPA/sum;
    printf("%.2f",GPA);
	return 0;	 
}
int main(){
    int n;
    scanf("%d\n",&n);
    float GPA,s=0.0,m=0.0,j[n];
    int x[n],c[n];
    for(int t=0;t<n;t++){
       scanf("%d",&(x[t]));
    }
    for(int j=0;j<n;j++){
       scanf("%d",&(c[j]));
    }
    for(int i=0;i<n;i++){
       if(c[i]>=90){
         j[i]=4.0;
       }else if(c[i]>=85){
         j[i]=3.7;
       }else if(c[i]>=82){
         j[i]=3.3;
       }else if(c[i]>=78){
         j[i]=3.0;
       }else if(c[i]>=75){
         j[i]=2.7;
       }else if(c[i]>=72){
         j[i]=2.3;
       }else if(c[i]>=68){
         j[i]=2.0;
       }else if(c[i]>=65){
         j[i]=1.5;
       }else if(c[i]>=60){
         j[i]=1.0;
       }else{
         j[i]=0.0;}
       s+=(j[i])*(x[i]);
       m+=x[i];
    }
    GPA=s/m;
    printf("%.2f",GPA);
    return 0;
}
int main(){
	int a[10],b[10];
	int n,i,m=0;
	double s=0,GPA;
	scanf("%d",&n);
	for(i=1;i<n+1;i++){
		scanf("%d",&a[i]);
		m+=a[i];
	}
	for(i=1;i<n+1;i++){
		scanf("%d",&b[i]);
	}
	for(i=1;i<n+1;i++){
		if(b[i]>89){
			s=s+a[i]*4.0;
		}else if(b[i]>84){
			s=s+a[i]*3.7;
		}else if(b[i]>81){
			s=s+a[i]*3.3;
		}else if(b[i]>77){
			s=s+a[i]*3.0;
		}else if(b[i]>74){
			s=s+a[i]*2.7;
		}else if(b[i]>71){
			s=s+a[i]*2.3;
		}else if(b[i]>67){
			s=s+a[i]*2.0;
		}else if(b[i]>63){
			s=s+a[i]*1.5;
		}else if(b[i]>59){
			s=s+a[i]*1.0;
		}else{
			s=s;
		}
	}
	GPA=1.0*s/m;
	printf("%.2lf",GPA);




return 0;
}
int main()
{
  int n,a;
  cin>>n;
  int q[n],score[n];
float gpa[n];
float avr,sum=0,psum=0;
  for (int i=0;i<n;i++)
  {
   cin>>q[i];
   }
   for (int i=0;i<n;i++)
   {
    cin>>score[i];
    }
  for (int i=0;i<n;i++)
{
a=score[i];
if(a>=90)
gpa[i]=4.0*q[i];
else if (a>=85)
gpa[i]=3.7*q[i];
else if (a>=82)
gpa[i]=3.3*q[i];
else if (a>=78)
gpa[i]=3.0*q[i];
else if (a>=75)
gpa[i]=2.7*q[i];
else if (a>=72)
gpa[i]=2.3*q[i];
else if (a>=68)
gpa[i]=2.0*q[i];
else if (a>=64)
gpa[i]=1.5*q[i];
else if (a>=60)
gpa[i]=1.0*q[i];
else
gpa[i]=0;
}
for (int i=0;i<n;i++)
{
sum+=gpa[i];
psum+=q[i];
}
avr=sum/psum;
printf("%.2f",avr);
}
/*
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
*/
struct P
{
	double a,b,c;
}pos[105];

double getP(int a)
{
	if(a>=90&&a<=100)
		return 4.0;
	else if(a>=85&&a<=89)
		return 3.7;
	else if(a>=82&&a<=84)
		return 3.3;
	else if(a>=78&&a<=81)
		return 3.0;
	else if(a>=75&&a<=77)
		return 2.7;
	else if(a>=72&&a<=74)
		return 2.3;
	else if(a>=68&&a<=71)
		return 2.0;
	else if(a>=64&&a<=67)
		return 1.5;
	else if(a>=60&&a<=63)
		return 1.0;
	return 0.0;
}
int main()
{
	int i,n;
	double sum1,sum2;

	while(scanf("%d",&n)!=EOF)
	{
		sum1=sum2=0.0;
		for(i=0;i<n;i++)
			scanf("%lf",&pos[i].a);
		for(i=0;i<n;i++)
			scanf("%lf",&pos[i].b);
		for(i=0;i<n;i++)
			pos[i].c=getP(pos[i].b);
		for(i=0;i<n;i++)
		{
			sum1+=pos[i].c*pos[i].a;
			sum2+=pos[i].a;
		}
		printf("%.2lf\n",sum1/sum2);
	}
	return 0;
}
int main(){
    int n,i,x=0;
	int sz[100],sa[100];
	double g=0.0,G;
	double sb[100];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&sz[i]);
	}
	for(i=0;i<n;i++)
	{
		scanf("%d",&sa[i]);
	}
	for(i=0;i<n;i++)
		if(sa[i]>89)
		{
			sb[i]=4.0;
			}else
		{
				if(sa[i]>84)
				{
					sb[i]=3.7;
				}else
				{
					if(sa[i]>81)
					{
						sb[i]=3.3;
					}else
					{
						if(sa[i]>77)
						{
							sb[i]=3.0;
						}else
						{
							if(sa[i]>74)
							{
								sb[i]=2.7;
							}else
							{
								if(sa[i]>71)
								{
									sb[i]=2.3;
								}else
								{
									if(sa[i]>67)
									{
										sb[i]=2.0;
									}else
									{
										if(sa[i]>63)
										{
											sb[i]=1.5;
										}else
										{
											if(sa[i]>59)
											{
												sb[i]=1.0;
												}else{sb[i]=0;}
										}
									}
								}
							}
						}
					}
				}
			}
	for(i=0;i<n;i++)
	{
		g=g+(sz[i])*(sb[i]);
		x=x+sz[i];
	}
     G=g/x;
	 printf("%.2lf",G);
	return 0;
}
int main()
{
    int n,i,s1=0;
    float s2=0.00,GPA;
    scanf("%d",&n);
    int xf[10],fs[10];
   float jd[10],xfjd[10];
    for(i=0;i<n;i++){
        scanf("%d",&xf[i]);}
        for(i=0;i<n;i++){
        scanf("%d",&fs[i]);
    }
    for(i=0;i<n;i++){
        if(fs[i]>=90&&fs[i]<=100)
        xfjd[i]=4.0*xf[i];
        else if(fs[i]>=85&&fs[i]<=89)
        xfjd[i]=3.7*xf[i];
         else if(fs[i]>=82&&fs[i]<=84)
        xfjd[i]=3.3*xf[i];
         else if(fs[i]>=78&&fs[i]<=81)
        xfjd[i]=3.0*xf[i];
         else if(fs[i]>=75&&fs[i]<=77)
        xfjd[i]=2.7*xf[i];
         else if(fs[i]>=72&&fs[i]<=74)
        xfjd[i]=2.3*xf[i];
         else if(fs[i]>=68&&fs[i]<=71)
        xfjd[i]=2.0*xf[i];
         else if(fs[i]>=64&&fs[i]<=67)
        xfjd[i]=1.5*xf[i];
         else if(fs[i]>=60&&fs[i]<=63)
        xfjd[i]=1.0*xf[i];
         else if(fs[i]<60)
        xfjd[i]=0*xf[i];
    }
    for(i=0;i<n;i++){
        s1=s1+xf[i];
        s2=s2+xfjd[i];
    }
    GPA=s2/s1;
    printf("%.2f",GPA);
    return 0;
}
void main()
{
	int n,i,b[10];
	double a[10],c[10],GPA,sum1=0,sum2=0;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%lf",&a[i]);
	}
	for(i=0;i<=n;i++)
	{
		scanf("%d",&b[i]);
	}
	for(i=0;i<n;i++)
	{
		if(b[i]<=100&&b[i]>=90)
			c[i]=4.0*a[i];
		else if(b[i]>=85)
			c[i]=3.7*a[i];
		else if(b[i]>=82)
			c[i]=3.3*a[i];
		else if(b[i]>=78)
			c[i]=3.0*a[i];
		else if(b[i]>=75)
			c[i]=2.7*a[i];
		else if(b[i]>=72)
			c[i]=2.3*a[i];
		else if(b[i]>=68)
			c[i]=2.0*a[i];
		else if(b[i]>=64)
			c[i]=1.5*a[i];
		else if(b[i]>=60)
			c[i]=1.0*a[i];
		else
			c[i]=0;
	}
	for(i=0;i<n;i++)
	{
		sum1=sum1+c[i];
		sum2=sum2+a[i];
	}
	GPA=sum1/sum2;
	printf("\n%.2lf\n",GPA);
}
int main()
 {
  float GPA,s=0;
  int i,n,m,o,t=0;
  scanf("%d",&n);
  int a[n],b[n];
  float c[n];
  for(m=1;m<=n;m++)
    {
       scanf("%d ",&a[m]);
    t=t+a[m];
    }
  for(i=1;i<=n;i++)
    {
      scanf("%d ",&b[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(o=1;o<=n;o++)
  {
  s=s+a[o]*c[o];
  }
  GPA=s/t;
  printf("%.2f",GPA);
  return 0;
 }
int main(){
	int n,i,xf[10],df[10],s=0;
	double jd[10],zongjd[10],sum=0,a;
	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(df[i]>=90){
			jd[i]=4.0;
		}else if(df[i]>=85){
			jd[i]=3.7;
		}else if(df[i]>=82){
			jd[i]=3.3;
		}else if(df[i]>=78){
			jd[i]=3.0;
		}else if(df[i]>=75){
			jd[i]=2.7;
		}else if(df[i]>=72){
			jd[i]=2.3;
		}else if(df[i]>=68){
			jd[i]=2.0;
		}else if(df[i]>=64){
			jd[i]=1.5;
		}else if(df[i]>=60){
			jd[i]=1.0;
		}else{
			jd[i]=0;
		}
	}
	for(i=0;i<n;i++){
		zongjd[i]=jd[i]*xf[i];
		sum+=zongjd[i];
		s+=xf[i];
	}
	a=sum/s;
	printf("%.2lf",a);
	return 0;
}
int main(){
	int n,i;
	float GPA=0.00,s=0,b=0;
	int xf[10];
	int cj[10];
	float jd[10];
	scanf("%d",&n);
	for(i=1;i<=n;i++){
		scanf("%d",&(xf[i]));
	}
	for(i=1;i<=n;i++){
		scanf("%d",&(cj[i]));
	}
	for(i=1;i<=n;i++){
		if(cj[i]<=100&&cj[i]>=90){
			jd[i]=4.0;}else
		if(cj[i]<=89&&cj[i]>=85){
			jd[i]=3.7;}else
		if(cj[i]<=84&&cj[i]>=82){
			jd[i]=3.3;}else
		if(cj[i]<=81&&cj[i]>=78){
			jd[i]=3.0;}else
		if(cj[i]<=77&&cj[i]>=75){
			jd[i]=2.7;}else
		if(cj[i]<=74&&cj[i]>=72){
			jd[i]=2.3;}else
		if(cj[i]<=71&&cj[i]>=68){
			jd[i]=2.0;}else
		if(cj[i]<=67&&cj[i]>=64){
			jd[i]=1.5;}else
		if(cj[i]<=63&&cj[i]>=60){
			jd[i]=1.0;}else
		if(cj[i]<=59&&cj[i]>=0){
			jd[i]=0;}
	}
	for(i=1;i<=n;i++){
		s=s+jd[i]*xf[i];
	}
	for(i=1;i<=n;i++){
		b=b+xf[i];
	}
	GPA=s/b;
	printf("%.2f",GPA);
	return 0;
}
void main()
{int n,i,s=0;
 float GPA,t=0;
 float c[3][9];
 scanf("%d",&n);
 for(i=0;i<=n-1;i++)
 {scanf("%f",&c[1][i]);
  s=s+c[1][i];}
 for(i=0;i<=n-1;i++)
 {scanf("%f",&c[2][i]);
  if(c[2][i]<60)
   c[0][i]=0;
  else if(c[2][i]<=63)
   c[0][i]=1.0;
  else if(c[2][i]<=67)
   c[0][i]=1.5;
  else if(c[2][i]<=71)
   c[0][i]=2.0;
  else if(c[2][i]<=74)
   c[0][i]=2.3;
  else if(c[2][i]<=77)
   c[0][i]=2.7;
  else if(c[2][i]<=81)
   c[0][i]=3;
  else if(c[2][i]<=84)
   c[0][i]=3.3;
  else if(c[2][i]<=89)
   c[0][i]=3.7;
  else c[0][i]=4.0;
  t=t+c[1][i]*c[0][i];}
  GPA=t/s;
 printf("%.2f",GPA);
}
float f(int a)
 {
        if(90<=a&&a<=100)  return 4;
        if(85<=a&&a<=89)  return 3.7;
        if(82<=a&&a<=84)  return 3.3;
        if(78<=a&&a<=81)  return 3.0;
        if(75<=a&&a<=77)  return 2.7;    
        if(72<=a&&a<=74)  return 2.3; 
        if(68<=a&&a<=71)  return 2.0;
        if(64<=a&&a<=67)  return 1.5;
        if(60<=a&&a<=63)  return 1.0;
        if(a<60)  return 0;
		}
 int main()
{
     int n,i,m;
	 float h;
     h=0;m=0;
     float GPA;
     scanf("%d\n",&n);
     int c[10],b[10];
     for(i=0;i<n;i++)
      {
          scanf("%d\b",&c[i]);
       }
      printf("\n");
      for(i=0;i<n;i++)
	  {
          scanf("%d\b",&b[i]);
       }
    
        for(i=0;i<n;i++)
           {
               h+=f(b[i])*c[i];
	      m+=c[i];
		}
       GPA=(float)h/m;
       printf("%.2f",GPA);
        return 0;
}
void main()
{
int n,a[11],b[11],i;float GPA,c[11],d[11],P=0,Q=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]>=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;
}
for(i=0;i<n;i++)
 d[i]=a[i]*c[i];
for(i=0;i<n;i++)
P=P+d[i];
for(i=0;i<n;i++)
Q=Q+a[i];
GPA=P/Q;
printf("%.2f\n",GPA);
}
void main()
{
	int i,n,s=0,a[9]={0},b[9]={0};float c[9]={0},d[9]={0},t=0,m;
	scanf("%d",&n);
	for(i=0;i<=n-1;i++)
	{
		scanf("%d",&a[i]);
	}
	for(i=0;i<=n-1;i++)
	{
		scanf("%d",&b[i]);
		if(b[i]<60)
		{c[i]=0;}
		if(b[i]>=60&&b[i]<64)
		{c[i]=1.0;}
		if(b[i]>=64&&b[i]<68)
		{c[i]=1.5;}
		if(b[i]>=68&&b[i]<72)
		{c[i]=2.0;}
		if(b[i]>=72&&b[i]<75)
		{c[i]=2.3;}
		if(b[i]>=75&&b[i]<78)
		{c[i]=2.7;}
		if(b[i]>=78&&b[i]<82)
		{c[i]=3.0;}
		if(b[i]>=82&&b[i]<85)
		{c[i]=3.3;}
		if(b[i]>=85&&b[i]<90)
		{c[i]=3.7;}
		if(b[i]>=90)
		{c[i]=4;}
	}
	for(i=0;i<=n-1;i++)
	{
		d[i]=a[i]*c[i];
		t=t+d[i];
		s=s+a[i];
	}
	m=t/s;
	printf("%.2f",m);
}
void main()
{
	int n,c[100],x[100],i,k,sum=0;
	double j[100],gpa=0,GPA;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&x[i]);
	}
	for(i=0;i<n;i++)
	{
		scanf("%d",&c[i]);
	}
	for(i=0;i<n;i++)
	{
		if(c[i]<=100&&c[i]>89)
			j[i]=4.0;
		else if(c[i]<=89&&c[i]>84)
			j[i]=3.7;
		else if(c[i]<=84&&c[i]>81) 
			j[i]=3.3;
		else if(c[i]<=81&&c[i]>77)
			j[i]=3.0;
		else if(c[i]<=77&&c[i]>74)
			j[i]=2.7;
		else if(c[i]<=74&&c[i]>71)
			j[i]=2.3;
								else if(c[i]<=71&&c[i]>67)
									j[i]=2.0;
								else if(c[i]<=67&&c[i]>63)
									j[i]=1.5;
								else if(c[i]<=63&&c[i]>59)
									j[i]=1.0;
								else
									j[i]=0;
								gpa+=(double)j[i]*x[i];
								sum+=x[i];
	}
	GPA=gpa/sum;
	printf("%.2lf",GPA);
}
int main(){
	int n,i,j,y;
	double x,s;
	x=0;
	y=0;
	i=0;
	s=0;
	scanf("%d",&n);
	int a[10];
	for(i=0;i<n;i++){
		scanf("%d",&a[i]);
	}
	double b[10];
	j=0;
	for(j=0;j<n;j++){
		scanf("%lf",&b[j]);
	}
	j=0;
	for(j=0;j<n;j++){
		if(b[j]<=100&&b[j]>=90){
			b[j]=4.0;
		}else if(b[j]<=89&&b[j]>=85){
			b[j]=3.7;
		}else if(b[j]<=84&&b[j]>=82){
			b[j]=3.3;
		}else if(b[j]<=81&&b[j]>=78){
			b[j]=3.0;
		}else if(b[j]<=77&&b[j]>=75){
			b[j]=2.7;
		}else if(b[j]<=74&&b[j]>=72){
			b[j]=2.3;
		}else if(b[j]<=71&&b[j]>=68){
			b[j]=2.0;
		}else if(b[j]<=67&&b[j]>=64){
			b[j]=1.5;
		}else if(b[j]<=63&&b[j]>=60){
			b[j]=1.0;
		}else if(b[j]<=59){
			b[j]=0;
		}
	}
	i=0;
	for(i=0;i<n;i++){
		j=i;
		x=x+b[j]*a[i];
	}
	i=0;
	for(i=0;i<n;i++){
		y=y+a[i];
	}
	s=x/y;
	printf("%.2lf",s);
	return 0;
}
int main(){
	double a[10]={0};
	double b[10]={0};
	double c[10]={0};
	int N;
	int i;
	int	k=0;
	int x;
	double total1=0;
	double total2=0;
	double GPA;
	scanf("%d",&N);
	for(i=0;i<N;i++){
		scanf("%d",&x);
		a[i]=x;
	}
	for(i=0;i<N;i++){
		scanf("%d",&x);
		b[i]=x;
	}
	for(i=0;i<N;i++){
		if(b[i]>=90&&b[i]<=100){
			c[i]=4.0;
		}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 if(b[i]>=0&&b[i]<=59){
			c[i]=0;
		}
	}
	for(i=0;i<N;i++){
		total1+=a[i]*c[i];
	}
	for(i=0;i<N;i++){
		total2+=a[i];
	}
	GPA=total1/total2;
	printf("%.2lf",GPA);
	return 0;
}
int main(int argc, char* argv[])
{
	int n,i,j;
	float c=0,a[10],b[10];
	double e=0, d;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%f",&a[i]);
		c+=a[i];
		
	}
	for(j=0,i=0;j<n,i<n;j++,i++){
		scanf("%f",&b[j]);
		if(b[j]>=90) d=4.0*a[i];
	    else if(b[j]>=85&&b[j]<=89) d=3.7*a[i];
		else if(b[j]>=82&&b[j]<=84) d=3.3*a[i];
        else if(b[j]>=78&&b[j]<=81) d=3.0*a[i];
        else if(b[j]>=75&&b[j]<=77) d=2.7*a[i];
        else if(b[j]>=72&&b[j]<=74) d=2.3*a[i];
        else if(b[j]>=68&&b[j]<=71) d=2.0*a[i];
        else if(b[j]>=64&&b[j]<=67) d=1.5*a[i];
        else if(b[j]>=60&&b[j]<=63) d=1.0*a[i];
        else if(b[j]<=60) d=0*a[i];
		e+=d;
	}
	double GPA;
	GPA=e/c;
    printf("%.2lf",GPA);
	return 0;
}
int main()
{
	int n,w[10],f[10],sw=0,i,t;
	double ans,j[10],a,b;
	double sum=0.0;
	scanf("%d",&n);
	for(i=0;i<=n-1;i++)
	{
		scanf("%d",&w[i]);
		sw=sw+w[i];
	}
	for(t=0;t<=n-1;t++)
	{
		scanf("%d",&f[t]);
		if(f[t]>=90)j[t]=4.0;
		if(f[t]>=85 && f[t]<=89)j[t]=3.7;
		if(f[t]>=82 && f[t]<=84)j[t]=3.3;
		if(f[t]>=78 && f[t]<=81)j[t]=3.0;
		if(f[t]>=75 && f[t]<=77)j[t]=2.7;
		if(f[t]>=72 && f[t]<=74)j[t]=2.3;
		if(f[t]>=68 && f[t]<=71)j[t]=2.0;
		if(f[t]>=64 && f[t]<=67)j[t]=1.5;
		if(f[t]>=60 && f[t]<=63)j[t]=1.0;
		if(f[t]>=0 && f[t]<=59)j[t]=0.0;
		a=j[t];
		b=w[t];
		sum=sum+a*b;
	}
	ans=sum/sw;
	printf("%.2lf",ans);
	return 0;
}
void main()
{
	double a[10];
	double b[10];
	double c[10];
	int n,i,j;
	double s1,s2,jd;
	s1=0;
	s2=0;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
		scanf("%lf ",&a[i-1]);
	for(j=1;j<=n;j++)
		scanf("%lf ",&b[j-1]);
	for(i=0;i<=n-1;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.0;
	}
      for(i=0;i<=n-1;i++)
	  {
		  s1=s1+a[i];
		  s2=s2+a[i]*c[i];
	  }

      jd=s2/(double)(s1);
	  printf("%.2lf",jd);
}
void main()
{
	int a[10],b[10],i,n,m=0;
	float c[10],y,sum=0;
	scanf("%d\n",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d ",&a[i]);
	}
	scanf("\n");
	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(85<=b[i] && b[i]<=89) c[i]=3.7;
		else if(82<=b[i] && b[i]<=84) c[i]=3.3;
		else if(78<=b[i] && b[i]<=81) c[i]=3.0;
		else if(75<=b[i] && b[i]<=77) c[i]=2.7;
		else if(72<=b[i] && b[i]<=74) c[i]=2.3;
		else if(68<=b[i] && b[i]<=71) c[i]=2.0;
		else if(64<=b[i] && b[i]<=67) c[i]=1.5;
		else if(60<=b[i] && b[i]<=63) c[i]=1.0;
		else if(b[i]<60) c[i]=0;
	}
	for(i=0;i<n;i++)
	{
		sum=sum+a[i]*c[i];
		m=m+a[i];
	}
	y=sum/m;
	printf("%.2f",y);
}