semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main(){
    int i,n;
    double GPA;
    double sum1=0;
    double sum2=0;
    int xf[10];
    int df[10];
    double gpa[10];
    scanf("%d\n",&n);
    for(i=0;i<n;i++){
        if(i==n-1){
            scanf("%d\n",&(xf[i]));
        }else{
            scanf("%d",&(xf[i]));
        }
    }
    for(i=0;i<n;i++){
        scanf("%d",&(df[i]));
    }
    for(i=0;i<10;i++){
        if(df[i]>=90){
            gpa[i]=4.0;
        }else if(df[i]>=85){
            gpa[i]=3.7;
        }else if(df[i]>=82){
            gpa[i]=3.3;
        }else if(df[i]>=78){
            gpa[i]=3.0;
        }else if(df[i]>=75){
            gpa[i]=2.7;
        }else if(df[i]>=72){
            gpa[i]=2.3;
        }else if(df[i]>=68){
            gpa[i]=2.0;
        }else if(df[i]>=64){
            gpa[i]=1.5;
        }else if(df[i]>=60){
            gpa[i]=1.0;
        }else{
            gpa[i]=0;
        }
    }
    for(i=0;i<n;i++){
        sum1+=xf[i]*gpa[i];
        sum2+=xf[i];
    }
    GPA=1.0*sum1/sum2;
    printf("%.2lf",GPA);
    return 0;
}
int main()
{
	int i,n,point[10],grade[10];
	double pg[10],sum1,sum2,gpa;
	scanf("%d", &n);
	sum1=0;
	sum2=0;
	for(i=0;i<n;i++)
	{
		scanf("%d", &point[i]);
	}
	for(i=0;i<n;i++)
	{
		scanf("%d", &grade[i]);
	}
	for(i=0;i<n;i++)
	{
		if(grade[i]>89&&grade[i]<=100)
		{
			pg[i]=4.0;
		}
		if(grade[i]>84&&grade[i]<=89)
		{
			pg[i]=3.7;
		}
		if(grade[i]>81&&grade[i]<=84)
		{
			pg[i]=3.3;
		}
		if(grade[i]>77&&grade[i]<=81)
		{
			pg[i]=3.0;
		}
		if(grade[i]>74&&grade[i]<=77)
		{
			pg[i]=2.7;
		}
		if(grade[i]>71&&grade[i]<=74)
		{
			pg[i]=2.3;
		}
		if(grade[i]>68&&grade[i]<=71)
		{
			pg[i]=2.0;
		}
		if(grade[i]>63&&grade[i]<=67)
		{
			pg[i]=1.5;
		}
		if(grade[i]>59&&grade[i]<=63)
		{
			pg[i]=1.0;
		}
		if(grade[i]<=59)
		{
			pg[i]=0;
		}
		sum1=sum1+pg[i]*point[i];
		sum2=sum2+point[i];
	}
	gpa=sum1/sum2;
	printf("%.2lf",gpa);
	return 0;
}
main()
{
	int n,s,i;
	int a[10],b[10];
	float c[10];
	float sum,q;
	scanf("%d\n",&n);
	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)
			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;
	}
	sum=0;s=0;
	for(i=0;i<n;i++)
		sum=sum+a[i]*c[i];
	for(i=0;i<n;i++)
		s=s+a[i];
	q=sum/s;
	printf("%.2lf",q);
}
int main()
{
int n,i;
int sub[10],g[10],s=0;
float G[10],GPA=0;
scanf("%d\n",&n);
for(i=0;i<n-1;i++){
scanf("%d ",&sub[i]);
}
scanf("%d\n",&sub[n-1]);
for(i=0;i<n-1;i++){
scanf("%d ",&g[i]);
}
scanf("%d",&g[n-1]);
for(i=0;i<n;i++){
if(90<=g[i]&&g[i]<=100){
G[i]=4.0;
}else if(85<=g[i]&&g[i]<=89){
G[i]=3.7;
}else if(82<=g[i]&&g[i]<=84){
G[i]=3.3;
}else if(78<=g[i]&&g[i]<=81){
G[i]=3.0;
}else if(75<=g[i]&&g[i]<=77){
G[i]=2.7;
}else if(72<=g[i]&&g[i]<=74){
G[i]=2.3;
}else if(68<=g[i]&&g[i]<=71){
G[i]=2.0;
}else if(64<=g[i]&&g[i]<=67){
G[i]=1.5;
}else if(60<=g[i]&&g[i]<=63){
G[i]=1.0;
}else if(g[i]<=59){
G[i]=0;
}
G[i]*=sub[i];
GPA+=G[i];
s+=sub[i];
}
GPA=GPA/s;
printf("%.2f",GPA);
return 0;
}
int main()
{
 int n,i,s=0;
 scanf("%d",&n);
 printf("\n");
 int a[n],b[n];
 double c[n],sum=0,x;
 for(i=0;i<n;i++)
 {
  scanf("%d ",&a[i]);
  s=s+a[i];
 }
 printf("\n");
 for(i=0;i<n;i++)
 {
  scanf("%d ",&b[i]);
  if(b[i]>89) c[i]=4.0;
  else if(b[i]>84) c[i]=3.7;
  else if(b[i]>81) c[i]=3.3;
  else if(b[i]>77) c[i]=3.0;
  else if(b[i]>74) c[i]=2.7;
  else if(b[i]>71) c[i]=2.3;
  else if(b[i]>67) c[i]=2.0;
  else if(b[i]>63) c[i]=1.5;
  else if(b[i]>59) c[i]=1.0;
  else c[i]=0;
  sum=sum+c[i]*a[i];
 }
  printf("\n");
  x=sum/s;
  printf("%.2lf\n",x);
  return 0;
}
struct grade
{
	int classgrade;
	int finalgrade;
	double GPA;
}G[100];

int main()
{
	int n, i;
	scanf("%d", &n);
	for(i=0;i<n;i++)
	{
		scanf("%d ", &G[i].classgrade);
	}
	for(i=0;i<n;i++)
	{
		scanf("%d", &G[i].finalgrade);
	}
	for(i=0;i<n;i++)
	{
		if((G[i].finalgrade>=90)&&(G[i].finalgrade<=100))
			G[i].GPA=G[i].classgrade*4.0;
		if((G[i].finalgrade>=85)&&(G[i].finalgrade<=89))
			G[i].GPA=G[i].classgrade*3.7;
		if((G[i].finalgrade>=82)&&(G[i].finalgrade<84))
			G[i].GPA=G[i].classgrade*3.3;
		if((G[i].finalgrade>=78)&&(G[i].finalgrade<=81))
			G[i].GPA=G[i].classgrade*3.0;
		if((G[i].finalgrade>=75)&&(G[i].finalgrade<=77))
			G[i].GPA=G[i].classgrade*2.7;
		if((G[i].finalgrade>=72)&&(G[i].finalgrade<=74))
			G[i].GPA=G[i].classgrade*2.3;
		if((G[i].finalgrade>=68)&&(G[i].finalgrade<=71))
			G[i].GPA=G[i].classgrade*2.0;
		if((G[i].finalgrade>=64)&&(G[i].finalgrade<=67))
			G[i].GPA=G[i].classgrade*1.5;
		if((G[i].finalgrade>=60)&&(G[i].finalgrade<=63))
			G[i].GPA=G[i].classgrade*1.0;
		if(G[i].finalgrade<=60)
			G[i].GPA=0;
	}
	double allG=0;
	double allcG=0;
	for(i=0;i<n;i++)
	{
		allG=allG+G[i].GPA;
	}
	for(i=0;i<n;i++)
	{
		allcG=allcG+G[i].classgrade;
	}
	float g=allG/allcG;
	printf("%.2f", g);
	return 0;
}
int main(){
	int n,q,i;

	double s,m,A;
	scanf("%d",&n);
    int f[n];
	double g[n];
	int x[n];
    s=0;
    m=0;
    q=0;
  
    for( i=0 ;  i < n ;  i++){
		scanf("%d", &(x[i]));
		q+=x[i];
}
 for( i=0 ;  i < n ;  i++){
		scanf("%d", &(f[i]));
	  if(f[i]>=90&&f[i]<=100){
           g[i]=4.0;
   }else if(f[i]>=85&&f[i]<=89){
         g[i]=3.7;
   }else if(f[i]>=82&&f[i]<=84){
         g[i]=3.3;
   }else if(f[i]>=78&&f[i]<=81){
         g[i]=3.0;
   }else if(f[i]>=75&&f[i]<=77){
         g[i]=2.7;
   }else if(f[i]>=72&&f[i]<=74){
         g[i]=2.3;
   } else if(f[i]>=68&&f[i]<=71){
         g[i]=2.0;
   } else if(f[i]>=64&&f[i]<=67){
         g[i]=1.5;
   } else if(f[i]>=60&&f[i]<=63){
         g[i]=1.0;
   } else{
          g[i]=0.0;
   }
      m=x[i]*g[i];

		s+=m;
	}
    A=s/q;
    printf("%.2lf",A);
	return 0;
}
int main()
{
	int i,n,xuefen[100]={0},grade[100]={0};
	float GPA[100]={0},a=0,sum=0;
	cin>>n;
	for(i=0;i<n;++i)
		cin>>xuefen[i];
	for(i=0;i<n;++i)
	{
		cin>>grade[i];
		if(grade[i]>=90&&grade[i]<=100)
		GPA[i]=4.0;
		else if(grade[i]>=85&&grade[i]<=89)
		GPA[i]=3.7;
		else if(grade[i]>=82&&grade[i]<=84)
		GPA[i]=3.3;
		else if(grade[i]>=78&&grade[i]<=81)
		GPA[i]=3.0;
		else if(grade[i]>=75&&grade[i]<=77)
		GPA[i]=2.7;
		else if(grade[i]>=72&&grade[i]<=74)
		GPA[i]=2.3;
		else if(grade[i]>=68&&grade[i]<=71)
		GPA[i]=2.0;
		else if(grade[i]>=64&&grade[i]<=67)
		GPA[i]=1.5;
		else if(grade[i]>=60&&grade[i]<=63)
		GPA[i]=1.0;
		else 
			GPA[i]=0;
	}
	for(i=0;i<n;++i)
       {
		   sum+=xuefen[i]*GPA[i];
		   a+=xuefen[i];
	}
	printf("%.2f",sum/a);
	 return 0;
}
void main()
{int n,i,d=0,a[10],b[10];float c=0;float f(int x);
	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=c+a[i]*f(b[i]);d=d+a[i];}
	printf("%.2f",c/d);
}
float f(int x)
{if(x>=90)return 4.0;else if(x>=85)return 3.7;
	else if(x>=82)return 3.3;else if(x>=78)return 3.0;else if(x>=75)return 2.7;
	else if(x>=72)return 2.3;else if(x>=68)return 2.0;else if(x>=64)return 1.5;
	else if(x>=60)return 1.0;else return 0;}
int main()
{
	int a,i,e;
	float b,c;
	int s[10],g[10],k[10];
	scanf("%d",&a);
	e=0;
	for(i=0;i<a;i++){
	scanf("%d",&(s[i]));
	e+=s[i];
	}
	b=0;
	for(i=0;i<a;i++){
	scanf("%d",&(g[i]));
	if(g[i]<60){
		k[i]=0*s[i];
	}else if(g[i]>=60&&g[i]<=63){
		k[i]=10*s[i];
	}else if(g[i]>=64&&g[i]<=67){
		k[i]=15*s[i];
	}else if(g[i]>=68&&g[i]<=71){
		k[i]=20*s[i];
	}else if(g[i]>=72&&g[i]<=74){
		k[i]=23*s[i];
	}else if(g[i]>=75&&g[i]<=77){
		k[i]=27*s[i];
	}else if(g[i]>=78&&g[i]<=81){
		k[i]=30*s[i];
	}else if(g[i]>=82&&g[i]<=84){
		k[i]=33*s[i];
	}else if(g[i]>=85&&g[i]<=89){
		k[i]=37*s[i];
	}else if(g[i]>=90&&g[i]<=100){
		k[i]=40*s[i];
	}
	b+=k[i];
	}
	c=1.0*b/e/10;
	printf("%.2f",c);
	return 0;
}
void main()
{
	int n;
	scanf("%d\n",&n);
	int a[100],b[100],j,sum1=0;
	float GPA,c[100],sum=0;
	for(j=0;j<=n-1;j++)scanf("%d",&a[j]);
	for(j=0;j<=n-1;j++)scanf("%d",&b[j]);
	for(j=0;j<=n-1;j++)
	{   
		if(90<=b[j]) c[j]=4.0;
		else if(85<=b[j]) c[j]=3.7;
		else if(82<=b[j]) c[j]=3.3;
		else if(78<=b[j]) c[j]=3.0;
		else if(75<=b[j]) c[j]=2.7;
		else if(72<=b[j]) c[j]=2.3;
		else if(68<=b[j]) c[j]=2.0;
		else if(64<=b[j]) c[j]=1.5;
		else if(60<=b[j]) c[j]=1.0;
		else c[j]=0.0;
	}
	for(j=0;j<=n-1;j++)sum=sum+a[j]*c[j];
	for(j=0;j<=n-1;j++)sum1=sum1+a[j];
	GPA=sum/sum1;
	printf("%.2f\n",GPA);
}
double whatmark(int a)
{
    if(a>=90 && a<=100)return 4.0;   
    if(a>=85 && a<=89) return 3.7;
    if(a>=82 && a<=84) return 3.3;   
    if(a>=78 && a<=81)  return 3.0;
    if(a>=75 && a<=77) return 2.7;   
    if(a>=72 && a<=74)  return 2.3;
    if(a>=68 && a<=71) return 2.0;   
    if(a>=64 && a<=67)  return 1.5;
    if(a>=60 && a<=63) return 1.0;   
    if(a<60) return 0;
}
int main()
{
    int N,i,score[11],mark[11],tmark;
    double sum;
    cin>>N;
    for(i=1;i<=N;i++) cin>>mark[i];
    for(i=1;i<=N;i++) cin>>score[i];
    for(i=1,tmark=0;i<=N;i++) tmark+=mark[i];
    for(i=1,sum=0;i<=N;i++) sum+=whatmark(score[i])*mark[i];
    printf("%.2f\n",sum*1.0/tmark);
}
int main (){
	int n,i;
	double GPA=0;
	int sum=0;
	double score[10];
	int point[10];
	scanf("%d\n",&n);
	for(i=0;i<n;i++){
		scanf("%d",&(point[i]));}
    for(i=0;i<n;i++){
		scanf("%lf",&(score[i]));}
    for(i=0;i<n;i++){
		if(score[i]>=90&&score[i]<=100){
			score[i]=4.0;}
		else if(score[i]>=85&&score[i]<=89){
			score[i]=3.7;}
		else if(score[i]>=82&&score[i]<=84){
			score[i]=3.3;}
		else if(score[i]>=78&&score[i]<=81){
			score[i]=3.0;}
		else if(score[i]>=75&&score[i]<=77){
			score[i]=2.7;}
		else if(score[i]>=72&&score[i]<=74){
			score[i]=2.3;}
		else if(score[i]>=68&&score[i]<=71){
			score[i]=2.0;}
		else if(score[i]>=64&&score[i]<=67){
			score[i]=1.5;}
		else if(score[i]>=60&&score[i]<=63){
			score[i]=1.0;}
		else if(score[i]<60){
			score[i]=0.0;}
		GPA+=1.0*score[i]*point[i];
	}
    for(i=0;i<n;i++){
		sum+=point[i];}
	GPA/=sum;
	printf("%.2lf",GPA);
	return 0;
}
int main()
{
    int k,j,i,n;
    cin>>n;
    float a[n];
    float b[n];
    float s[n];
    float sum=0,x;
    for(i=0;i<n;i++)
    {cin>>a[i];}
    for(j=0;j<n;j++)
    {cin>>b[j];}
    for(x=0,k=0;k<n;k++)
    {
          if (b[k]>=90) s[k]=4;
          else if (b[k]<=89&&b[k]>84) s[k]=3.7;
          else if (b[k]<=84&&b[k]>81) s[k]=3.3;
          else if (b[k]<=81&&b[k]>77) s[k]=3.0;
          else if (b[k]<=77&&b[k]>74) s[k]=2.7;
          else if (b[k]<=74&&b[k]>71) s[k]=2.3;
          else if (b[k]<=71&&b[k]>67) s[k]=2;
          else if (b[k]<=67&&b[k]>63) s[k]=1.5;
          else if (b[k]<=63&&b[k]>59) s[k]=1;
          else s[k]=0;
         sum=sum+a[k]*s[k];
         x=x+a[k];
}
    sum=sum/x;
    printf("%.2f",sum);
    return 0;
}
void main()
{ int n,i,b[100];
float d[100],s=0,a[100],c=0;
scanf("%d\n",&n);
for(i=0;i<n;i++)
{scanf("%f",&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) d[i]=(float)(4.0*a[i]);
else if(b[i]<=89&&b[i]>=85) d[i]=(float)(3.7*a[i]);
else if(b[i]<=84&&b[i]>=82) d[i]=(float)(3.3*a[i]);
else if(b[i]<=81&&b[i]>=78) d[i]=(float)(3.0*a[i]);
else if(b[i]<=77&&b[i]>=75) d[i]=(float)(2.7*a[i]);
else if(b[i]<=74&&b[i]>=72) d[i]=(float)(2.3*a[i]);
else if(b[i]<=71&&b[i]>=68) d[i]=(float)(2.0*a[i]);
else if(b[i]<=67&&b[i]>=64) d[i]=(float)(1.5*a[i]);
else if(b[i]<=63&&b[i]>=60) d[i]=(float)(1.0*a[i]);
else if(b[i]<60) d[i]=0;
}
for(i=0;i<n;i++)
{s=(float)(s+d[i]);c=(float)(c+a[i]);
}
s=(float)(s/c);
printf("%.2f",s);
}
int main(){
	int n,a[10],b[10];
	int i;
	float c[10],GPA=0,score=0;
	scanf("%d",&n);
	for (i=0;i<n;i=i+1){
		scanf("%d",&a[i]);
	}
	for (i=0;i<n;i=i+1){
		scanf("%d",&b[i]);
	}
	for(i=0;i<n;i=i+1){
		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=i+1){
		GPA=GPA+a[i]*c[i];
		score=score+a[i];
	}
	GPA=GPA/score;
	printf("%.2lf\n",GPA);
}
int main()
{
  int n,k;
  scanf("%d",&n);
  float a[15],b[15],GPA,sum=0;
  for(k=0;k<n;k++)
{
  scanf("%f",&a[k]);
}
  for(k=0;k<n;k++)
{
  scanf("%f",&b[k]);
}
  for(k=0;k<n;k++)
{
  if(b[k]>=90) b[k]=4;
  else if(b[k]>=85) b[k]=3.7;
  else if(b[k]>=82) b[k]=3.3;
  else if(b[k]>=78) b[k]=3.0;
  else if(b[k]>=75) b[k]=2.7;
  else if(b[k]>=72) b[k]=2.3;
  else if(b[k]>=68) b[k]=2.0;
  else if(b[k]>=64) b[k]=1.5;
  else if(b[k]>=60) b[k]=1.0;
  else b[k]=0;
}
  for(k=0;k<n;k++)
{
  GPA=GPA+a[k]*b[k];sum=sum+a[k];
}
  printf("%.2f",GPA/sum);
  return 0;
}
int main ()
{
 int xuefen[10],fenshu[10],n;
 float jidian[10],GPA;
 float jidianhe=0.0;
 int xuefenhe=0;
 int i;
 scanf ("%d",&n);
 for (i=0;i<n;i++)
 {
  scanf ("%d",&(xuefen[i]));
  xuefenhe+=xuefen[i];
 }
    for (i=0;i<n;i++)
 { 
  scanf ("%d",&(fenshu[i]));
 }
 for (i=0;i<n;i++)
    {
  if (fenshu[i]<=100&&fenshu[i]>=90)
  {
   jidian[i]=4.0f;
  }
  else if (fenshu[i]<=89&&fenshu[i]>=85)
  { 
   jidian[i]=3.7f;
  }
  else if (fenshu[i]<=84&&fenshu[i]>=82)
  { 
   jidian[i]=3.3f;
  }
  else if (fenshu[i]<=81&&fenshu[i]>=78)
  { 
   jidian[i]=3.0f;
  }
  else if (fenshu[i]<=77&&fenshu[i]>=75)
  { 
   jidian[i]=2.7f;
  }
  else if (fenshu[i]<=74&&fenshu[i]>=72)
  { 
   jidian[i]=2.3f;
  }
  else if (fenshu[i]<=71&&fenshu[i]>=68)
  { 
   jidian[i]=2.0f;
  }
  else if (fenshu[i]<=67&&fenshu[i]>=64)
  { 
   jidian[i]=1.5f;
  }
  else if (fenshu[i]<=63&&fenshu[i]>=60)
  { 
   jidian[i]=1.0f;
  } 
  else jidian[i]=0;
   
    jidianhe+=jidian[i]*((float )xuefen[i]);
 }
      
 GPA=jidianhe/(float )xuefenhe;
 printf("%.2f",GPA);
 return 0;
}
int main ()
{
	int xf[10],cj[10];
	float jd[10],jdhe=0,zong=0,gpa=0;
	int n,i;
	scanf ("%d",&n);
	for (i=0;i<n;i++){
		scanf("%d",&xf[i]);
	}
	for (i=0;i<n;i++){
		scanf("%d",&cj[i]);
	
	if (cj[i]>=90 && cj[i]<=100){
		jd[i]=4.0;
	}
	if (cj[i]>=85 && cj[i]<=89){
		jd[i]=3.7;
	}
	if (cj[i]>=82 && cj[i]<=84){
		jd[i]=3.3;
	}
	if (cj[i]>=78 && cj[i]<=81){
		jd[i]=3.0;
	}
	if (cj[i]>=75 && cj[i]<=77){
		jd[i]=2.7;
	}
	if (cj[i]>=72 && cj[i]<=74){
		jd[i]=2.3;
	}
	if (cj[i]>=68 && cj[i]<=71){
		jd[i]=2.0;
	}
	if (cj[i]>=64 && cj[i]<=67){
		jd[i]=1.5;
	}
	if (cj[i]>=60 && cj[i]<=63){
		jd[i]=1.0;
	}
	if (cj[i]<60){
		jd[i]=0;
	}
	}
	
	for (i=0;i<n;i++)
	{
		jdhe+=xf[i]*jd[i];
		zong+=xf[i];
	}
	gpa=jdhe/zong;
	printf("%.2f",gpa);

	return 0;
}
void main()
{
	int n,i;
	float GPA,sum1=0,sum2=0;
	int xuefen[100];
	float score[100];

	scanf("%d",&n);

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

	for(i=0;i<n;i++)
	{
		sum1=sum1+(xuefen[i]*score[i]);
		sum2=sum2+xuefen[i];
	}
	GPA=sum1/sum2;

	printf("%.2f",GPA);
}
int main(){
	int n, i;
	scanf("%d", &n);
	int xf[10], chj[10];
	int xh;
	float gpa[10];
	float sum, GPA;
	sum =0;
    xh = 0;	
	for(i=0;i<=n-1;i++){
		if(i==0){
			scanf("%d", &xf[i]);
		}else{
			scanf(" %d", &xf[i]);
		}
	}
    for(i=0;i<n;i++){
		if(i==0){
			scanf("%d", &chj[i]);
		}else{
		scanf(" %d",&chj[i]);
		}
		if(chj[i]<=100 && chj[i]>=90){
			gpa[i] = 4.0;
		}else if(chj[i]<=89 && chj[i]>=85){
			gpa[i] = 3.7;
		}else if(chj[i]<=84 && chj[i]>=82){
			gpa[i] = 3.3;
		}else if(chj[i]<=81 && chj[i]>=78){
			gpa[i] = 3.0;
		}else if(chj[i]<=77 && chj[i]>=75){
			gpa[i] = 2.7;
		}else if(chj[i]<=74 && chj[i]>=72){
			gpa[i] = 2.3;
		}else if(chj[i]<=71 && chj[i]>=68){
			gpa[i] = 2.0;
		}else if(chj[i]<=67 && chj[i]>=64){
			gpa[i] = 1.5;
		}else if(chj[i]<=63 && chj[i]>=60){
			gpa[i] = 1.0;
		}else{
			gpa[i] = 0;
		}
	}

	for(i=0;i<=n-1;i++){
		sum = sum + gpa[i] * xf[i];
		xh = xh + xf[i] ;
	}
	  GPA = sum / xh;
	  printf("%.2f", GPA);
	  return 0;
}
int a[10000],b[10000];
double g[10000];
double GPA(int c);
void average(int n);
int main(){
	int n;
	scanf("%d",&n);
	for(int i1=0;i1<n;i1++){
		scanf("%d",&(b[i1]));
	}
    for(int i2=0;i2<n;i2++){
		scanf("%d",&(a[i2]));
	}
	for(int i3=0;i3<n;i3++){
		g[i3]=GPA(a[i3]);
	}
	average(n);
	return 0;
}

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

void average(int n){
	double sum1=0,aver;
	int sum2=0;
	for(int i4=0;i4<n;i4++){
		sum1+=g[i4]*b[i4];
		sum2+=b[i4];
	}
	aver=sum1/sum2;
	printf("%.2lf\n",aver);
}
void main()
{
	int n,i,a[10],sum1=0;
	float b[10],sum2=0,GPA;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d ",&a[i]);
        sum1+=a[i]; 
	}
	for(i=0;i<n;i++) 
	 {  
		scanf("%f",&b[i]);
		if(b[i]>=90&&b[i]<=100) b[i]=4.0;
		else if(b[i]>=85&&b[i]<=89) b[i]=3.7;
		else if(b[i]>=82&&b[i]<=84) b[i]=3.3;
		else if(b[i]>=78&&b[i]<=81) b[i]=3.0;
		else if(b[i]>=75&&b[i]<=77) b[i]=2.7;
		else if(b[i]>=72&&b[i]<=74) b[i]=2.3;
		else if(b[i]>=68&&b[i]<=71) b[i]=2.0;
		else if(b[i]>=64&&b[i]<=67) b[i]=1.5;
		else if(b[i]>=60&&b[i]<=63) b[i]=1.0;
		else b[i]=0;
	}
	for(i=0;i<n;i++) 
		sum2=sum2+(a[i]*b[i]);
	GPA=sum2/sum1;
	printf("%.2f",GPA);
}
int main()
{
    int n,F=0,i;
    scanf("%d",&n);
    int a[n],b[n];
    double g[n],G[n],GPA,sum=0.00;
    for(i=0;i<n;i++)
    {
         scanf("%d",&a[i]);
         F+=a[i];
    }
    for(i=0;i<n;i++)
    {
         scanf("%d",&b[i]);
    }
    for(i=0;i<n;i++)
    {
         if(b[i]<60){
               g[i]=0.00;
         }else if(b[i]<=63){
               g[i]=1.00 ;
         }else if(b[i]<=67){
               g[i]=1.50;
         }else if(b[i]<=71){
               g[i]=2.00;
         }else if(b[i]<=74){
               g[i]=2.30;
         }else if(b[i]<=77){
               g[i]=2.70;
         }else if(b[i]<=81){
               g[i]=3.00;
         }else if(b[i]<=84){
               g[i]=3.30;
         }else if(b[i]<=89){
               g[i]=3.70;
         }else if(b[i]<=100){
               g[i]=4.00;
         }
    }
    for(i=0;i<n;i++)
    {
         G[i]=g[i]*a[i];
         sum+=G[i];
    }
      GPA=sum/F;
      printf("%.2f",GPA);
      return 0;
}
void main()
{
	int n,a[1000],t=0,i;
	float b[1000],s=0;
	scanf("%d",&n);
    for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
		t=t+a[i];
	}
	for(i=0;i<n;i++)
	{
		scanf("%f",&b[i]);
		if(b[i]>89&&b[i]<101)
			b[i]=4.0;
		else if(b[i]>84&&b[i]<90)
			b[i]=3.7;
        else if(b[i]>81&&b[i]<85)
			b[i]=3.3;
		else if(b[i]>77&&b[i]<82)
			b[i]=3.0;
		else if(b[i]>74&&b[i]<78)
			b[i]=2.7;
		else if(b[i]>71&&b[i]<75)
			b[i]=2.3;
		else if(b[i]>67&&b[i]<72)
			b[i]=2.0;
		else if(b[i]>63&&b[i]<68)
			b[i]=1.5;
		else if(b[i]>59&&b[i]<64)
			b[i]=1.0;
		else 
			b[i]=0;
	}
	for(i=0;i<n;i++)
		s=a[i]*b[i]+s;
	printf("%.2f",s/(float)t);
}
int main()
{
	double a[11];
	double b[11];
	double sum=0;
	double GPA=0;
	int n,i;
	

	for(i=0;i<11;i++){
		a[i]=0;
		b[i]=0;
	}
	scanf("%d",&n);

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

	for(i=0;i<n;i++){
		if(100>=b[i]&&b[i]>=90){
			b[i]=4.0;
			continue;}
		if(89>=b[i]&&b[i]>=85){
			b[i]=3.7;
			continue;}
		if(84>=b[i]&&b[i]>=82){
			b[i]=3.3;
			continue;}
		if(81>=b[i]&&b[i]>=78){
			b[i]=3.0;
			continue;}
		if(77>=b[i]&&b[i]>=75){
			b[i]=2.7;
			continue;}
		if(74>=b[i]&&b[i]>=72){
			b[i]=2.3;
			continue;}
		if(71>=b[i]&&b[i]>=68){
			b[i]=2.0;
			continue;}
		if(67>=b[i]&&b[i]>=64){
			b[i]=1.5;
			continue;}
		if(63>=b[i]&&b[i]>=60){
			b[i]=1.0;
			continue;}
		if(60>b[i]){
			b[i]=0.0;
			continue;}		
		
	}
	for(i=0;i<n;i++){
		GPA+=b[i]*a[i];
}

	printf("%.2f",GPA/sum);
	return 0;
}
int main()
{
	int a[10],b[10],i,n;
	double g[10],c[10],jidian,xuefen;
	float GPA;
	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 && b[i]<=100){
		    g[i]=4.0;
		}else if(b[i]>=85 && b[i]<=89){
			g[i]=3.7;
		}else if(b[i]>=82 && b[i]<=84){
		    g[i]=3.3;
		}else if(b[i]>=78 && b[i]<=81){
		    g[i]=3.0;
		}else if(b[i]>=75 && b[i]<=77){
		    g[i]=2.7;
		}else if(b[i]>=72 && b[i]<=74){
		    g[i]=2.3;
		}else if(b[i]>=68 && b[i]<=71){
		    g[i]=2.0;
		}else if(b[i]>=64 && b[i]<=67){
		    g[i]=1.5;
		}else if(b[i]>=60 && b[i]<=63){
		    g[i]=1.0;
		}else{g[i]=0;}
	}
	for(i=0;i<n;i++){
	    c[i]=g[i]*a[i];
		jidian+=c[i];
		xuefen+=a[i];
	}
	GPA=(float)(jidian/xuefen);
    printf("%.2f",GPA);
    return 0;
}
int main(){
	int n,a[10],b[10],i;
	double s=0,c[10],GPA,t=0;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&a[i]);
		t=t+a[i];
	}
	for(i=0;i<n;i++){
		scanf("%d",&b[i]);
		if(b[i]>=90&&b[i]<=100){
			c[i]=4.0;
			continue;
		}
		if(b[i]>=85&&b[i]<=89){
			c[i]=3.7;
		continue;
		}
		if(b[i]>=82&&b[i]<=84){
			c[i]=3.3;
			continue;
		}
		if(b[i]>=78&&b[i]<=81){
			c[i]=3.0;
			continue;
		}
         if(b[i]>=75&&b[i]<=77){
			c[i]=2.7;
			continue;
		}
         if(b[i]>=72&&b[i]<=74){
			c[i]=2.3;
			continue;
		}
         if(b[i]>=68&&b[i]<=71){
			c[i]=2.0;
			continue;
		}
       if(b[i]>=64&&b[i]<=67){
			c[i]=1.5;
			continue;
		}
        if(b[i]>=60&&b[i]<=63){
			c[i]=1.0;
			continue;
		}
		if(b[i]<60){
			c[i]=0;
			continue;
		}
	}
	for(i=0;i<n;i++){
		s=s+a[i]*c[i];
	}
         GPA=s/t;
	printf("%.2lf",GPA);
	return 0;
}
/* Note:Your choice is C IDE */
void main()
{
	int i,n,a[11]={0},b[11]={0};
	float n1=0,n2=0,n3=0;
    scanf("%d",&n);
    if(getchar()==10);
    for(i=1;i<=n;i++)scanf("%d",&b[i]);
    if(getchar()==10);
    for(i=1;i<=n;i++)scanf("%d",&a[i]);
    if(getchar()==10);
    for(i=1;i<=n;i++)
    {
    	if(a[i]<60)a[i]=0;
    	else if(a[i]<=63)a[i]=10;
    	else if(a[i]<=67)a[i]=15;
    	else if(a[i]<=71)a[i]=20;
    	else if(a[i]<=74)a[i]=23;
    	else if(a[i]<=77)a[i]=27;
    	else if(a[i]<=81)a[i]=30;
        else if(a[i]<=84)a[i]=33;
        else if(a[i]<=89)a[i]=37;
    	else if(a[i]<=100)a[i]=40;
    }
    for(i=1;i<=n;i++)n1=n1+a[i]*b[i];
    for(i=1;i<=n;i++)n2=n2+b[i];
    n3=n1/10/n2;
    printf("%.2f\n",n3);
}
int main()
{
int i,n;
double a[10],b[10],s,m,g;
scanf("%d",&n);
for(i=0,m=0;i<n;i++)
{
scanf("%lf",&a[i]);
m=m+a[i];
}
for(i=0;i<n;i++) scanf("%lf",&b[i]);
for(i=0,s=0;i<n;i++)
{
if(b[i]>=90&&b[i]<=100) b[i]=4.0;
else if(b[i]>=85&&b[i]<=89) b[i]=3.7;
else if(b[i]>=82&&b[i]<=84) b[i]=3.3;
else if(b[i]>=78&&b[i]<=81) b[i]=3.0;
else if(b[i]>=75&&b[i]<=77) b[i]=2.7;
else if(b[i]>=72&&b[i]<=74) b[i]=2.3;
else if(b[i]>=68&&b[i]<=71) b[i]=2.0;
else if(b[i]>=64&&b[i]<=67) b[i]=1.5;
else if(b[i]>=60&&b[i]<=63) b[i]=1.0;
else b[i]=0;
s=s+a[i]*b[i];
}
g=s/m;
printf("%.2lf\n",g);
return 0;
}
main()
{   int a[10][2];
    float b[10];
    int n,i,q;
    float p,GPA;
    scanf("%d",&n);
    for(i=1;i<=n;i++)
      scanf("%d",&a[i-1][0]);
    for(i=1;i<=n;i++)
      scanf("%d",&a[i-1][1]);
    for(i=1;i<=n;i++)
      {
      if(a[i-1][1]<60)
        b[i-1]=0;
      if(a[i-1][1]>=60&&a[i-1][1]<=63)
        b[i-1]=1.0;
      if(a[i-1][1]>=64&&a[i-1][1]<=67)
        b[i-1]=1.5;
      if(a[i-1][1]>=68&&a[i-1][1]<=71)
        b[i-1]=2.0;
      if(a[i-1][1]>=72&&a[i-1][1]<=74)
        b[i-1]=2.3;
      if(a[i-1][1]>=75&&a[i-1][1]<=77)
        b[i-1]=2.7;
      if(a[i-1][1]>=78&&a[i-1][1]<=81)
        b[i-1]=3.0;
      if(a[i-1][1]>=82&&a[i-1][1]<=84)
        b[i-1]=3.3;
      if(a[i-1][1]>=85&&a[i-1][1]<=89)
        b[i-1]=3.7;
      if(a[i-1][1]>=90)
        b[i-1]=4.0;
        }
    p=0;
    q=0;
    for(i=1;i<=n;i++)
      {
       p=p+a[i-1][0]*b[i-1];
       q=q+a[i-1][0];
       }
    GPA=p/q;
    printf("%.2f",GPA);
}