semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
    int n,x[10],a[10],i,j,s1=0;
    float b,s2=0,GPA;
    scanf("%d",&n);
    for(j=0;j<n;j++)
    {
        scanf("%d",&x[j]);
        s1+=x[j];
    }
    for(i=0,j=0;i<n,j<n;i++,j++)
    { 
        scanf("%d",&a[i]);
        if(a[i]<=100&&a[i]>=90)
	   b=4.0;
        if(a[i]<=89&&a[i]>=85)
	   b=3.7;
        if(a[i]<=84&&a[i]>=82)
	   b=3.3;
        if(a[i]<=81&&a[i]>=78)
	   b=3.0;
        if(a[i]<=77&&a[i]>=75)
	   b=2.7;
        if(a[i]<=74&&a[i]>=72)
	   b=2.3;
        if(a[i]<=71&&a[i]>=68)
	   b=2.0;
        if(a[i]<=67&&a[i]>=64)
	   b=1.5;
        if(a[i]<=63&&a[i]>=60)
	   b=1.0;
        if(a[i]<60)
	   b=0;
        s2=s2+x[j]*b;
     }
     GPA=s2/s1;
     printf("%.2f",GPA);
     return 0;
}
int main()
{
	int n,cre[10]={0},gra[10]={0},i;
	float poi[10]={0},sum=0,gpa,s=0;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&cre[i]);
	}
	for(i=0;i<n;i++)
	{
		scanf("%d",&gra[i]);
		if(gra[i]<60)
			poi[i]=0;
		else if(gra[i]<64)
			poi[i]=1.0;
		else if(gra[i]<68)
			poi[i]=1.5;
		else if(gra[i]<72)
			poi[i]=2.0;
		else if(gra[i]<75)
		poi[i]=2.3;
		else if(gra[i]<78)
		poi[i]=2.7;
		else if(gra[i]<82)
			poi[i]=3.0;
		else if(gra[i]<85)
			poi[i]=3.3;
		else if(gra[i]<90)
			poi[i]=3.7;
		else
			poi[i]=4.0;
		sum+=cre[i]*poi[i];s+=cre[i];
	}
	gpa=sum/s;
	printf("%.2f",gpa);
	return 0;
}
int main()
{
  int n,sz[10],a[10],i,b;
  double j,k,GPA;
  j=0;
  k=0;
  scanf("%d",&n);
  for(i=0;i<n;i++){
  	scanf("%d",&sz[i]);
  	k=k+sz[i];
  }
  for(i=0;i<n;i++){
  	scanf("%d",&a[i]);if(a[i]>=90&&a[i]<=100){
  		j=j+4.0*sz[i];
  	}
  	if(a[i]>=85&&a[i]<=89){
  		j=j+3.7*sz[i];
  	}
  	if(a[i]>=82&&a[i]<=84){
  		j=j+3.3*sz[i];
  	}
  	if(a[i]>=78&&a[i]<=81){
  		j=j+3.0*sz[i];
  	}
  	if(a[i]>=75&&a[i]<=77){
  		j=j+2.7*sz[i];
  	}
  	if(a[i]>=72&&a[i]<=74){
  		j=j+2.3*sz[i];
  	}
  	if(a[i]>=68&&a[i]<=71){
  		j=j+2.0*sz[i];
  	}
  	if(a[i]>=64&&a[i]<=67){
  		j=j+1.5*sz[i];
  	}
  	if(a[i]>=60&&a[i]<=63){
  		j=j+1.0*sz[i];
  	}
  	if(a[i]<60){
  		j=j+0*sz[i];
  	} 		
  }
  GPA=j/k;
  printf("%.2lf",GPA);
    return 0;
}
void main()
{
	int i,j,n,a[2][10];float m,k,s,GPA;
	scanf("%d",&n);
	for(i=0;i<n;i++)scanf("%d",&a[0][i]);
	for(j=0;j<n;j++)scanf("%d",&a[1][j]);
	for(s=0,k=0,i=0;i<n;i++)
	{
		if(a[1][i]>=90)m=a[0][i]*4.0;
		else if(a[1][i]>=85)m=a[0][i]*3.7;
		else if(a[1][i]>=82)m=a[0][i]*3.3;
		else if(a[1][i]>=78)m=a[0][i]*3.0;
		else if(a[1][i]>=75)m=a[0][i]*2.7;
		else if(a[1][i]>=72)m=a[0][i]*2.3;
		else if(a[1][i]>=68)m=a[0][i]*2.0;
		else if(a[1][i]>=64)m=a[0][i]*1.5;
		else if(a[1][i]>=60)m=a[0][i]*1.0;
		else m=0;
		s=s+m;k=k+a[0][i];
	}
	GPA=s/k;
	printf("%.2f\n",GPA);

}
void main()
{
	int a[2][10],n,i,j;
	float xfjd=0,GPA,xfh=0,b[11];
	scanf("%d",&n);

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


	for(i=0;i<n;i++)
		xfjd=a[0][i]*b[i]+xfjd;

    for(i=0;i<n;i++)
		xfh=xfh+a[0][i];

	GPA=xfjd/xfh;

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

}
void main()
{
	int a[11]={0};
	int b[11]={0};
	int n,i;
	float c[11]={0};
	float GPA;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
		{
		   scanf("%d",&a[i]);
		   a[0]=a[0]+a[i];
		}
	
	for(i=1;i<=n;i++)
        {
		   scanf("%d",&b[i]);
		   if (b[i]<60) c[i]=0;
		   else if (b[i]<=63&&b[i]>=60)  c[i]=a[i]*1.0;
		   else if (b[i]<=67&&b[i]>=64)  c[i]=a[i]*1.5;
		   else if (b[i]<=71&&b[i]>=68)  c[i]=a[i]*2.0;
		   else if (b[i]<=74&&b[i]>=72)  c[i]=a[i]*2.3;
		   else if (b[i]<=77&&b[i]>=75)  c[i]=a[i]*2.7;
		   else if (b[i]<=81&&b[i]>=78)  c[i]=a[i]*3.0;
		   else if (b[i]<=84&&b[i]>=82)  c[i]=a[i]*3.3;
		   else if (b[i]<=89&&b[i]>=85)  c[i]=a[i]*3.7;
		   else if (b[i]<=100&&b[i]>=90) c[i]=a[i]*4.0;
	    }
	
	for (i=1;i<=n;i++)
	    c[0]=c[0]+c[i];
	
	GPA=c[0]/a[0];
	printf("%.2f",GPA);		
}
double JiDian(int cj);
int main(){
 int n;
 scanf("%d",&n);
 int cj[10];
 int xf[10];
 int i,j;
 for(j=0;j<n;j++){
  scanf("%d",&(xf[j]));
 }
 for(i=0;i<n;i++){
  scanf("%d",&(cj[i]));
 }
 double x=0;
 double y=0;
 for(i=0,j=0;i<n,j<n;i++,j++){
  x+=JiDian(cj[i])*(xf[j]);
  y+=xf[j];
 }
double GPA;
 GPA=x/y;
 printf("%.2lf\n",GPA);
 return 0;
}
double JiDian(int cj){
 double jidian;
 if(cj<=100&&cj>=90){
  jidian=4.0;
 }else if(cj<=89&&cj>=85){
  jidian=3.7;
 }else if(cj<=84&&cj>=82){
  jidian=3.3;
    }else if(cj<=81&&cj>=78){
  jidian=3.0;
 }else if(cj<=77&&cj>=75){
  jidian=2.7;
 }else if(cj<=74&&cj>=72){
  jidian=2.3;
    }else if(cj<=71&&cj>=68){
  jidian=2.0;
 }else if(cj<=67&&cj>=64){
  jidian=1.5;
 }else if(cj<=63&&cj>=60){
  jidian=1.0;
 }else{
  jidian=0;
 }
 return jidian;
}
int main()
{
	int m=0,n,a[100],b[100],i;
	float c[100],s=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]>=90)
			s+=a[i]*4;
		else if(b[i]>=85)
			s+=a[i]*3.7;
		else if(b[i]>=82)
			s+=a[i]*3.3;
		else if(b[i]>=78)
			s+=a[i]*3;
		else if(b[i]>=75)
			s+=a[i]*2.7;
		else if(b[i]>=72)
			s+=a[i]*2.3;
		else if(b[i]>=68)
			s+=a[i]*2;
		else if(b[i]>=64)
			s+=a[i]*1.5;
		else if(b[i]>=60)
			s+=a[i]*1;
		else;
	}
	for(i=0;i<n;i++)
		m+=a[i];
	s/=m;
	printf("%.2lf",s);
	return 0;
}
int main(){
    int n;
    scanf("%d",&n);
    int i;
    int a[MAX],b[MAX];
    double c[MAX];
    int t;
    double s,GPA;
    for(i=0;i<n;i++){
        scanf("%d",&a[i]);
    }
    for(i=0;i<n;i++){
        scanf("%d",&b[i]);
        if(b[i]>=90){
            c[i]=4.0;
        }
        else if(b[i]>=85&&b[i]<90){
            c[i]=3.7;
        }
        else if(b[i]>=82&&b[i]<85){
            c[i]=3.3;
        }
        else if(b[i]>=78&&b[i]<82){
            c[i]=3.0;
        }
        else if(b[i]>=75&&b[i]<78){
            c[i]=2.7;
        }
        else if(b[i]>=72&&b[i]<75){
            c[i]=2.3;
        }
        else if(b[i]>=68&&b[i]<72){
            c[i]=2.0;
        }
        else if(b[i]>=64&&b[i]<68){
            c[i]=1.5;
        }
        else if(b[i]>=60&&b[i]<64){
            c[i]=1.0;
        }
        else{
            c[i]=0;
        }
    }
        s=0;
        t=0;
        for(i=0;i<n;i++){
            s=s+a[i]*c[i];
        }
        for(i=0;i<n;i++){
            t=t+a[i];
        }
        GPA=s/t;
        printf("%.2lf\n",GPA);
        return 0;
}
int main()
{
	int n,a[10];
	float b[10],x,y=0,sum=0;
	int i;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
		sum=sum+a[i];
	}
	for(i=0;i<n;i++)
	{	
		scanf("%f",&b[i]);
	}
	for(i=0;i,n;i++)
	{
	if(b[i]<=100&&b[i]>=90)
		b[i]=4.0;
	else if(b[i]<=89&&b[i]>=85)
		b[i]=3.7;
	else if(b[i]<=84&&b[i]>=82)
		b[i]=3.3;
	else if(b[i]<=81&&b[i]>=78)
		b[i]=3.0;
	else if(b[i]<=77&&b[i]>=75)
		b[i]=2.7;
	else if(b[i]<=74&&b[i]>=72)
		b[i]=2.3;
	else if(b[i]<=71&&b[i]>=68)
		b[i]=2.0;
	else if(b[i]<=67&&b[i]>=64)
		b[i]=1.5;
	else if(b[i]<=63&&b[i]>=60)
		b[i]=1.0;
	else if(b[i]<60)
		b[i]=0;
	x=b[i]*a[i];
	y=y+x;
	}
	printf("%.2f",y/sum);
	return 0;
}
int main(){
	int n,i;
	double GPA;
	scanf("%d",&n);
	int xf[10];
	int fs[10];
	double jd[10],a=0,b=0;
	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]<=100&&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;}
	}
	for(i=0;i<n;i++){
		a+=jd[i]*xf[i];
		b+=xf[i];
	}
	GPA=a/b;
	printf("%.2lf",GPA);


			


	return 0;
}
int main()
{ float change(int n);
	int n,i,c1[100],s[100];
float GPA,sum=0,c=0,g[100];
scanf("%d\n",&n);
scanf("%d",&c1[0]);
for(i=1;i<=n-1;i++)
{scanf(" %d",&c1[i]);}
/*scanf("\n");*/
scanf("%d",&s[0]);
for(i=1;i<=n-1;i++)
{scanf(" %d",&s[i]);}
for(i=0;i<=n-1;i++)
{g[i]=change(s[i]);}
for(i=0;i<=n-1;i++)
{sum=sum+g[i]*c1[i];
c=c+c1[i];}
GPA=sum/c;
printf("%.2f",GPA);
return 0;
}



float change(int n)
{ float y;
if(n>=90&&n<=100) y=4.0 ; 
else if(n>=85&&n<=89)  y=3.7 ;
else if(n>=82&&n<=84)  y=3.3 ;
else if(n>=78&&n<=81)  y=3.0 ;
else if(n>=75&&n<=77)  y=2.7 ;
else if(n>=72&&n<=74)  y=2.3 ;
else if(n>=68&&n<=71)  y=2.0 ;
else if(n>=64&&n<=67)  y=1.5 ;
else if(n>=60&&n<=63)  y=1.0 ;
else if(n<60) y=0; 
return (y);
}
int main()
{int n,i,j,k,l,max=-1,min=999,p=0; double nn=0,s=0,xx;
int a[10];
  scanf("%d",&n);
  for (i=1;i<=n;i++) 
  {scanf("%d",&a[i]); s+=a[i];} 
	for (i=1;i<=n;i++)   
	{
		  scanf("%d",&k);
		  if (90<=k) xx=4.0;
		   else if (85<=k) xx=3.7;
		      else if (82<=k) xx=3.3;
   else if (78<=k) xx=3.0;
   else if (75<=k) xx=2.7;
   else if (72<=k) xx=2.3;
   else if (68<=k) xx=2.0;
   else if (64<=k) xx=1.5;
   else if (60<=k) xx=1.0;
   else xx=0;
   nn+=xx*a[i];
	}

  printf("%.2lf",nn/s);
  return 0;
}
void main()
{int n,i,sum2=0,b[100]; 
 float c[100],a[100],GPA,sum1=0;
 scanf("%d",&n);
for(i=0;i<=(n-1);i++)
scanf("%f",&a[i]);
for(i=0;i<=(n-1);i++)
scanf("%d",&b[i]);
for(i=0;i<=(n-1);i++)
{if(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-1);i++)
sum1=sum1+c[i];
for(i=0;i<=(n-1);i++)
sum2=sum2+a[i];
GPA=sum1/sum2;
printf("%.2f",GPA);
}
void main()
{
	int n,i;
	float total=0.0,totalII=0.0,GPA,a[10],b[10],c[10],d[10];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	scanf("%f",&a[i]);
	for(i=0;i<n;i++)
	scanf("%f",&b[i]);
	for(i=0;i<n;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&&b[i]>=0)c[i]=0;
	}
	for(i=0;i<n;i++)
	{
		d[i]=a[i]*c[i];
	}
	for(i=0;i<n;i++)
	{
		total=total+d[i];
		totalII=totalII+a[i];
	}
	GPA=total/totalII;
	printf("%.2f",GPA);
	return;
}
int main(){
	int a[1000],n,i,b[1000];
	double c[1000],e,x=0,y=0,z;
	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++){
		c[i]=0;
	}
	for(i=0;i<n;i++){
		if(b[i]>=90){
			c[i]=4.0;
		}else{
			if(b[i]<90&&b[i]>=85){
				c[i]=3.7;
			}else{
				if(b[i]<85&&b[i]>=82){
					c[i]=3.3;
				}else{
					if(b[i]<82&&b[i]>=78){
						c[i]=3.0;
					}else{
						if(b[i]<78&&b[i]>=75){
							c[i]=2.7;
						}else{
							if(b[i]<75&&b[i]>=72){
								c[i]=2.3;
							}else{
								if(b[i]<72&&b[i]>=68){
									c[i]=2.0;
								}else{
									if(b[i]<68&&b[i]>=64){
										c[i]=1.5;
									}else{
										if(b[i]<64&&b[i]>=60){
											c[i]=1.0;
										}else{
											if(b[i]<60){
												c[i]=0;
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	for(i=0;i<n;i++){
		e=c[i]*a[i];
		x+=e;
		y+=a[i];
	}
	z=x/y;
	printf("%.2lf\n",z);
    return 0;
}
int main ()
{
    int x[2][10];
    int n,i,j;
    float jidian=0,s=0;
    scanf("%d",&n);
    for (i=0;i<2;i++)
    {
        for (j=0;j<n;j++)
        {
            scanf("%d",&x[i][j]);
        }
    }
   for (i=0;i<n;i++)
   {
       if (x[1][i]<60)
       jidian=jidian+0;
       if (x[1][i]>=60&&x[1][i]<=63)
       jidian=jidian+1.0*x[0][i];
       if (x[1][i]>=64&&x[1][i]<=67)
       jidian=jidian+1.5*x[0][i];
       if (x[1][i]>=68&&x[1][i]<=71)
       jidian=jidian+2.0*x[0][i];
       if (x[1][i]>=72&&x[1][i]<=74)
       jidian=jidian+2.3*x[0][i];
       if (x[1][i]>=75&&x[1][i]<=77)
       jidian=jidian+2.7*x[0][i];
       if (x[1][i]>=78&&x[1][i]<=81)
       jidian=jidian+3.0*x[0][i];
       if (x[1][i]>=82&&x[1][i]<=84)
       jidian=jidian+3.3*x[0][i];
        if (x[1][i]>=85&&x[1][i]<=89)
        jidian=jidian+3.7*x[0][i];
       if (x[1][i]>=90&&x[1][i]<=100)
        jidian=jidian+4.0*x[0][i];
   }
   for (i=0;i<n;i++)
   {
       s=s+x[0][i];
   }
   printf ("%.2f",jidian/s);
      return 0;
}
int main(){
int n,i,x[10000],y[10000],all=0;
double GPA,a[10000],t=0;
scanf("%d",&n);
for(i=0;i<n;i++){
	scanf("%d",&(x[i]));}
for(i=0;i<n;i++){
scanf("%d",&(y[i]));}
for(i=0;i<n;i++){
	if(90<=y[i]){a[i]=4.0;}
	else if(85<=y[i]&&y[i]<90){a[i]=3.7;}
	else if(82<=y[i]&&y[i]<85){a[i]=3.3;}
	else if(78<=y[i]&&y[i]<82){a[i]=3.0;}
	else if(75<=y[i]&&y[i]<78){a[i]=2.7;}
	else if(72<=y[i]&&y[i]<75){a[i]=2.3;}
	else if(68<=y[i]&&y[i]<72){a[i]=2.0;}
	else if(64<=y[i]&&y[i]<68){a[i]=1.5;}
	else if(60<=y[i]&&y[i]<64){a[i]=1.0;}
	else{a[i]=0;}
}
for(i=0;i<n;i++){
	all +=x[i];}
for(i=0;i<n;i++){
	t +=x[i]*a[i];}
GPA=t/all;
printf("%.2lf\n ",GPA);
return 0;
}
int main(){
	int xf[10];
	int cj[10];
    int n,i=0,r=0,a=0;
	double gpa=0;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&(xf[i]));
		a+=xf[i];
	}
	for(r=0;r<n;r++){
		scanf("%d",&(cj[r]));
		if(cj[r]>=90&&cj[r]<=100){
			gpa+=4.0*xf[r];
		}else if(cj[r]<=89&&cj[r]>=85){
			gpa+=3.7*xf[r];
		}else if(cj[r]>=82&&cj[r]<=84){
			  gpa+=3.3*xf[r];
		}else if(cj[r]>=78&&cj[r]<=81){
			  gpa+=3.0*xf[r];
		}else if(cj[r]>=75&&cj[r]<=77){
			  gpa+=2.7*xf[r];
		}else if(cj[r]>=72&&cj[r]<=74){
			  gpa+=2.3*xf[r];
		}else if(cj[r]>=68&&cj[r]<=71){
			  gpa+=2.0*xf[r];
		}else if(cj[r]>=64&&cj[r]<=67){
			  gpa+=1.5*xf[r];
		}else if(cj[r]>=60&&cj[r]<=63){
			  gpa+=1.0*xf[r];
		}else{
			gpa+=0;
		}

	}
		gpa=gpa/a;
	
		printf("%.2lf",gpa);
		return 0;
	}
void main()
{int n,a[100],b[100],i,j,s=0;
 float g,G=0.0,GPA,c[111];
 scanf("%d\n",&n);
 for(i=1;i<=n;i++)
  scanf("%d ",&a[i]);
 printf("\n");
 for(j=1;j<=n;j++)
  scanf("%d ",&b[j]);
 printf("\n");
 for(i=1;i<=n;i++)
  s=s+a[i];
 for(j=1;j<=n;j++)
  {if(b[j]>=90) g=4.0;
   else if(b[j]>=85) g=3.7;
   else if(b[j]>=82) g=3.3;
   else if(b[j]>=78) g=3.0;
   else if(b[j]>=75) g=2.7;
   else if(b[j]>=72) g=2.3;
   else if(b[j]>=68) g=2.0;
   else if(b[j]>=64) g=1.5;
   else if(b[j]>=60) g=1.0;
   else  g=0.0;
   c[j]=g*a[j];}
 for(j=1;j<=n;j++)
  G=G+c[j];
 GPA=G/s;
 printf("%.2f",GPA);
}
int main(){
	int n,i;
	float sum1=0,sum2=0,xf;
	float a[11],b[11];
	scanf("%d",&n);
	for(i=0;i<=n-1;i++){
		scanf("%f",&a[i]);}
	for(i=0;i<=n-1;i++){
		scanf("%f",&b[i]);}
	for(i=0;i<n;i++){
		if(90<=b[i]){
			xf=4.0*a[i];}
		else if(85<=b[i]){
			xf=3.7*a[i];}
		else if(82<=b[i]){
			xf=3.3*a[i];}
		else if(78<=b[i]){
			xf=3.0*a[i];}
		else if(75<=b[i]){
			xf=2.7*a[i];}
		else if(72<=b[i]){
			xf=2.3*a[i];}
		else if(68<=b[i]){
			xf=2.0*a[i];}
		else if(64<=b[i]){
			xf=1.5*a[i];}
		else if(60<=b[i]){
			xf=1.0*a[i];}
		else{xf=0;}
		sum1+=xf;
		sum2+=a[i];}
	printf("%.2f",sum1/sum2);
	return 0;
}
int main()
{
	int a,i,e=0;
	double b,c,d,gpa=0;
	int xf[n];
	int cj[n];
	scanf("%d",&a);
	for(i=0;i<a;i++)
	{
		scanf("%d",&(xf[i]));
	}
	for(i=0;i<a;i++)
	{
		scanf("%d",&(cj[i]));
	}
	for(i=0;i<a;i++)
	{
		if (cj[i]<=100&&cj[i]>89){b=4.0;}
		if (cj[i]>84&&cj[i]<90){b=3.7;}
		if (cj[i]>81&&cj[i]<85){b=3.3;}
		if (cj[i]>77&&cj[i]<82){b=3.0;}
		if (cj[i]>74&&cj[i]<78){b=2.7;}
		if (cj[i]>71&&cj[i]<75){b=2.3;}
		if (cj[i]>67&&cj[i]<72){b=2.0;}
		if (cj[i]>63&&cj[i]<68){b=1.5;}
		if (cj[i]>59&&cj[i]<64){b=1.0;}
		if (cj[i]<60){b=0;}
		c=xf[i]*b;
		e=e+xf[i];
		d=d+c;
		

	}
	gpa=d/e;
printf("%.2f",gpa);
return 0;
}
void main()
{
	int a[10],b[10],n,i=1;
	float jidian,GPA,c[10];
    float y=0,x=0;
		scanf("%d",&n);
	for(i=1;i<=n;i++)
		scanf("%d",&b[i]);
	for(i=1;i<=n;i++)
		scanf("%d",&a[i]);
	for(i=1;i<=n;i++)
	{
		if((90<=a[i])&&(a[i]<=100))
		{jidian=4.0;}
		if((85<=a[i])&&(a[i]<=89))
		{jidian=3.7;}
		if((82<=a[i])&&(a[i]<=84))
		{jidian=3.3;}
		if((78<=a[i])&&(a[i]<=81))
		{jidian=3.0;}
		if((75<=a[i])&&(a[i]<=77))
		{jidian=2.7;}
		if((72<=a[i])&&(a[i]<=74))
		{jidian=2.3;}
		if((68<=a[i])&&(a[i]<=71))
		{jidian=2.0;}
		if((64<=a[i])&&(a[i]<=67))
		{jidian=1.5;}
		if((60<=a[i])&&(a[i]<=63))
		{jidian=1.0;}
		if(a[i]<60)
		{jidian=0;}
		c[i]=jidian*b[i];
	}
	for(i=1;i<=n;i++)
	{
		x=x+c[i];
	    y=y+b[i];
	}
	GPA=x/y;
	printf("%.2f\n",GPA);
}
int main(){
    int xf[m],fs[m];
    double xfj[m],jd[m];
    int n,i;
    double gpa,zf,zj;
    scanf("%d",&n);
    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]<=100&&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;
        }
    }
    for(i=0;i<n;i++){
        xfj[i]=jd[i]*xf[i];
    }zf=0;
    for(i=0;i<n;i++){
        zf+=xf[i];
    }zj=0;
    for(i=0;i<n;i++){
        zj+=xfj[i];
    }gpa=zj/zf;
    printf("%.2lf",gpa);
    
    return 0;
}
int main()
{
	int n;
	int xf[10];
	float cj[10];
	int i=0;
	int j=0;
	scanf("%d",&n);
	while(j<=n-1)
	{
		scanf("%d",&xf[j]);
		j++;
	}
	while(i<=n-1)
	{
		scanf("%f",&cj[i]);
		if(cj[i]>=90&&cj[i]<=100)
		{
			cj[i]=4.0;
		}
		else if(cj[i]>=85&&cj[i]<=89)
		{
			cj[i]=3.7;
		}
		else if(cj[i]>=82&&cj[i]<=84)
		{

            cj[i]=3.3;
		}
		else if(cj[i]>=78&&cj[i]<=81)
		{
			cj[i]=3.0;
		}
		else if(cj[i]>=75&&cj[i]<=77)
		{
			cj[i]=2.7;
		}
		else if(cj[i]>=72&&cj[i]<=74)
		{
			cj[i]=2.3;
		}
		else if(cj[i]>=68&&cj[i]<=71)
		{
			cj[i]=2.0;
		}
		else if(cj[i]>=64&&cj[i]<=67)
		{
			cj[i]=1.5;
		}
		else if(cj[i]>=61&&cj[i]<=63)
		{
			cj[i]=1.0;
		}
		else
		{
			cj[i]=0.0;
		}
		
		i++;
	}
	float result=0;
	int k=0;
	int x=0;
	while(k<=n-1)
	{
		result=result+xf[k]*cj[k];
		x=x+xf[k];
		k++;
			}
	result=result/x;
	printf("%.2f",result);
	return 0;
}
int main()
{
    double k[9],f[9],l[9];
    double GPA,s,m;
    int n,i;
    m=0;
    s=0;
    scanf("%d",&n);
    for(i=0;i<n;i++){
       scanf("%lf",&k[i]);
	   m=m+k[i];
    }
    for(i=0;i<n;i++){
       scanf("%lf",&f[i]);
       if(f[i]>=90&&f[i]<=100)
          l[i]=4.0;
       else if(f[i]<=89&&f[i]>=85)
          l[i]=3.7;
       else if(f[i]<=84&&f[i]>=82)
          l[i]=3.3;
       else if(f[i]<=81&&f[i]>=78)
          l[i]=3.0;
       else if(f[i]<=77&&f[i]>=75)
          l[i]=2.7;
       else if(f[i]<=74&&f[i]>=72)
          l[i]=2.3;
       else if(f[i]<=71&&f[i]>=68)
          l[i]=2.0;
       else if(f[i]<=67&&f[i]>=64)
          l[i]=1.5;
       else if(f[i]<=63&&f[i]>=60)
          l[i]=1.0;
       else
          l[i]=0;
    }
    for(i=0;i<n;i++){
		s=s+k[i]*l[i];
	}
	GPA=s/m;
    printf("%.2lf",GPA);
    return 0;
}
int main()
{
	int n;
         scanf("%d",&n);
	int i;	
	int sz[10],sz2[10];
	for(i=0;i<n;i++){
		scanf("%d",&sz[i]);
	}
	for(i=0;i<n;i++){
		scanf("%d",&sz2[i]);
	}	
	double point[10];
	for(i=0;i<n;i++){
		if(sz2[i]<60)
			point[i]=0;
		else if(sz2[i]<64)
			point[i]=1.0;
		else if(sz2[i]<68)
			point[i]=1.5;
        else if(sz2[i]<72)
			point[i]=2.0;
        else if(sz2[i]<75)
			point[i]=2.3;
        else if(sz2[i]<78)
			point[i]=2.7;
        else if(sz2[i]<82)
			point[i]=3.0;
        else if(sz2[i]<85)
			point[i]=3.3;
        else if(sz2[i]<90)
			point[i]=3.7;
		else if(sz2[i]<=100)
			point[i]=4.0;
	}
	double m=0,result;
	int q=0;
	for(i=0;i<n;i++){
       m=m+point[i]*sz[i];
	   q=q+sz[i];
	   }
    result=m/q;
    printf("%.2lf",result);
return 0;
}
int main(){
 int n,i;
 float gpa,B,A;
 scanf("%d",&n);
 float a[10];
 float b[10];
 float c[10];
for(i=0;i<n;i++){scanf("%f",&a[i]);A+=a[i];}

for(i=0;i<n;i++)
{
scanf("%f",&b[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;
B+=c[i]*a[i];
}
gpa=B/A;
printf("%.2f",gpa);

 return 0;
}
int main()
{
int n,a,sum;
sum=0;
int an[10],cn[10];
double bn[10],sam,GPA;
sam=0.00;
scanf("%d",&n);
for(a=0;a<n;a++)
{
  scanf("%d",&cn[a]);
}
for(a=0;a<n;a++)
{sum+=cn[a];
}

for(a=0;a<n;a++)
{
	scanf("%d",&an[a]);
}
for(a=0;a<n;a++){
	if(an[a]>=90&&an[a]<=100)
		bn[a]=4.0;
	if(an[a]>=85&&an[a]<=89)
		bn[a]=3.7;
	if(an[a]>=82&&an[a]<=84)
		bn[a]=3.3;
	if(an[a]>=78&&an[a]<=81)
		bn[a]=3.0;
	if(an[a]>=75&&an[a]<=77)
		bn[a]=2.7;
	if(an[a]>=72&&an[a]<=74)
		bn[a]=2.3;
	if(an[a]>=68&&an[a]<=71)
		bn[a]=2.0;
	if(an[a]>=64&&an[a]<=67)
		bn[a]=1.5;
	if(an[a]>=60&&an[a]<=63)
		bn[a]=1.0;
	if(an[a]<60)
		bn[a]=0;
	
}
for(a=0;a<n;a++)
{
	
	sam+=cn[a]*bn[a];
}

GPA=sam/sum;
printf("%.2lf",GPA);
return 0;
}
main()
{
	int n,i,score;
	scanf("%d",&n);
	int a[n];
	for(i=0;i<n;i++)
		scanf("%d",&a[i]);
	double b[n];
	for(i=0;i<n;i++)
	{
		scanf("%d",&score);
		if(score>=90)
			b[i]=4.0;
		else if(score>=85)
			b[i]=3.7;
		else if(score>=82)
			b[i]=3.3;
		else if(score>=78)
			b[i]=3.0;
		else if(score>=75)
			b[i]=2.7;
		else if(score>=72)
			b[i]=2.3;
		else if(score>=68)
			b[i]=2.0;
		else if(score>=64)
			b[i]=1.5;
		else if(score>=60)
			b[i]=1.0;
		else
			b[i]=0;
	}
	double sum;
	int x;
	sum=0;
	x=0;
	for(i=0;i<n;i++)
	{
		sum=sum+a[i]*b[i];
		x=x+a[i];
	}
	double ave;
	ave=sum/x;
	printf("%.2lf",ave);
	return 0;
}
int main(){
int n;
scanf("%d",&n);
int a[n];
int sz[n];
int i,m;
double j,GPA,f;
GPA=0;
m=0;
for(i=0;i<n;i++){
scanf("%d",&a[i]);
m=m+a[i];
}
for(i=0;i<n;i++){
scanf("%d",&sz[i]);
}
for(i=0;i<n;i++){
if((sz[i]>=90)&&(sz[i]<=100)){
j=4.0;
}else if((sz[i]>=85)&&(sz[i]<=89)){
j=3.7;
}else if((sz[i]>=82)&&(sz[i]<=84)){
j=3.3;
}else if((sz[i]>=78)&&(sz[i]<=81)){
j=3.0;
}else if((sz[i]>=75)&&(sz[i]<=77)){
j=2.7;
}else if((sz[i]>=72)&&(sz[i]<=74)){
j=2.3;
}else if((sz[i]>=68)&&(sz[i]<=71)){
j=2.0;
}else if((sz[i]>=64)&&(sz[i]<=67)){
j=1.5;
}else if((sz[i]>=60)&&(sz[i]<=63)){
j=1.0;
}else if(sz[i]<60){
j=0;
}
f=j*a[i];
GPA=GPA+f;
}
GPA=GPA/m;
printf("%.2f",GPA);
return 0;
}
int main()
{
 int n;
 scanf("%d\n",&n);
 double a[10];
 int c=0;double b=0;
 #define ROW 2
int  sz[ROW][COL];  
 for(int row = 0; row  < 2; row++){
  for(int col = 0; col < n; col++){scanf("%d ",&sz[row][col]);}}
 for (int i=0;i<n;i++){
  if(sz[1][i]>=90&&sz[1][i]<=100){a[i]=4.0;}
  else{if((sz[1][i]>=85)&&(sz[1][i]<=89)){a[i]=3.7;}
 else{if((sz[1][i]>=82)&&(sz[1][i]<=84)){a[i]=3.3;}
 else{if((sz[1][i]>=78)&&(sz[1][i]<=81)){a[i]=3.0;}
    else{if((sz[1][i]>=75)&&(sz[1][i]<=77)){a[i]=2.7;}
 else{if((sz[1][i]>=72)&&(sz[1][i]<=74)){a[i]=2.3;}
 else{if((sz[1][i]>=68)&&(sz[1][i]<=71)){a[i]=2.0;}
 else{if((sz[1][i]>=64)&&(sz[1][i]<=67)){a[i]=1.5;}
 else{if((sz[1][i]>=60)&&(sz[1][i]<=63)){a[i]=1.0;}
 else{a[i]=0;}}}}}}}}}
b+=(a[i]*sz[0][i]);
  c+=sz[0][i];
 }
 double d;
 d=b/c;
 printf("%.2f\n",d);
 return 0;
}
main()
{
	int a[2][9],n,i,j,d;
	float b,GPA,c;
	scanf("%d",&n);
	for(i=0;i<2;i++)
	for(j=0;j<n;j++)
	   scanf("%d",&a[i][j]);
	c=0;d=0;
	for(j=0;j<n;j++)
	{
		if(a[1][j]>=90&&a[1][j]<=100) b=4.0;
	if(a[1][j]>=85&&a[1][j]<=89) b=3.7;
	if(a[1][j]>=82&&a[1][j]<=84) b=3.3;
	if(a[1][j]>=78&&a[1][j]<=81) b=3.0;
	if(a[1][j]>=75&&a[1][j]<=77) b=2.7;
	if(a[1][j]>=72&&a[1][j]<=74) b=2.3;
	if(a[1][j]>=68&&a[1][j]<=71) b=2.0;
	if(a[1][j]>=64&&a[1][j]<=67) b=1.5;
	if(a[1][j]>=60&&a[1][j]<=63) b=1.0;
	if(a[1][j]<60) b=0;
	c=c+a[0][j]*b;
	d=d+a[0][j];
	}
	GPA=c/d;
	printf("%.2f\n",GPA);
}