semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
//??????
int main()
{int n,a[10],b[10];
float GPA;
double c[10],SUMa,SUMc;
 int i;
  a[0]=0;
  b[0]=0;
  c[0]=0;
  SUMa=0;
  SUMc=0;

    scanf("%d",&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*a[i];
	else if ((b[i]<=89)&&(b[i]>=85)) c[i]=3.7*a[i];
	else if ((b[i]<=84)&&(b[i]>=82)) c[i]=3.3*a[i];
	else if ((b[i]<=81)&&(b[i]>=78)) c[i]=3.0*a[i];
	else if ((b[i]<=77)&&(b[i]>=75)) c[i]=2.7*a[i];
	else if ((b[i]<=74)&&(b[i]>=72)) c[i]=2.3*a[i];
	else if ((b[i]<=71)&&(b[i]>=68)) c[i]=2.0*a[i];
	else if ((b[i]<=67)&&(b[i]>=64)) c[i]=1.5*a[i];
    else if ((b[i]<=63)&&(b[i]>=60)) c[i]=1.0*a[i];
	else  c[i]=0*a[i];
	}

    for(i=0;i<n;i++)
	{SUMc=SUMc+(float)c[i];
     SUMa=SUMa+a[i];
	}

	GPA=(float)(SUMc/SUMa);

 printf("%.2f",GPA);
return 0;
}
int main(){
	int n,i,xfh;
	int xf[num];
	int fs[num];
	float jd[num];
	float jdh,GPA;
	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;
	if(fs[i]<=89&&fs[i]>=85) jd[i]=3.7;
	if(fs[i]<=84&&fs[i]>=82) jd[i]=3.3;
	if(fs[i]<=81&&fs[i]>=78) jd[i]=3.0;
	if(fs[i]<=77&&fs[i]>=75) jd[i]=2.7;
	if(fs[i]<=74&&fs[i]>=72) jd[i]=2.3;
	if(fs[i]<=71&&fs[i]>=68) jd[i]=2.0;
	if(fs[i]<=67&&fs[i]>=64) jd[i]=1.5;
	if(fs[i]<=63&&fs[i]>=60) jd[i]=1.0;
	if(fs[i]<60) jd[i]=0;}
	xfh=0;
	jdh=0;
    for(i=0;i<n;i++)
	{xfh=xfh+xf[i];}
	for(i=0;i<n;i++)
	{jdh=jdh+jd[i]*xf[i];}
	GPA=jdh/xfh;
	printf("%.2f",GPA);
    return 0;
}
void main()
{
  int n,i,m,a[10],b[10];
  float s,k,t;
  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]);
  s=0;m=0;
  for (i=0;i<=n-1;i++)
  {  if (b[i]>=90) t=4.0;
     if ((b[i]>=85)&&(b[i]<=89)) t=3.7;
	 if ((b[i]>=82)&&(b[i]<=84)) t=3.3;
     if ((b[i]>=78)&&(b[i]<=81)) t=3.0;
     if ((b[i]>=75)&&(b[i]<=77)) t=2.7;
     if ((b[i]>=72)&&(b[i]<=74)) t=2.3;
     if ((b[i]>=68)&&(b[i]<=71)) t=2.0;
     if ((b[i]>=64)&&(b[i]<=67)) t=1.5;
     if ((b[i]>=60)&&(b[i]<=63)) t=1.0;
	 if (b[i]<60) t=0;
   s=s+t*a[i];
   m=m+a[i];
  } 
  k=s/m;
  printf("%.2f",k);
}
int main()
{
   int n,i,j,k,sum1=0;
   scanf("%d",&n);
   int a[n],b[n];
   float c[n],d[n],sum2=0,gpa;
   for(i=0;i<n;i++){
       scanf("%d",&a[i]);
       sum1=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=sum2+d[k];
   }
   gpa=sum2/sum1;
   printf("%.2f",gpa);
   return 0;
}
void main()
{
	int n,a[10],i,c[10],sum2=0;
	double b[10],GPA,sum1=0;
	scanf("%d",&n);
	for(i=0;i<=n-1;i++)
	{
		scanf("%d",&a[i]);
	}
	for(i=0;i<=n-1;i++)
	{
		scanf("%d",&c[i]);
	}
	for(i=0;i<=n-1;i++)
	{
		if(c[i]>=90)b[i]=4.0;
		else
		{if(c[i]>=85)b[i]=3.7;
		else
		{if(c[i]>=82)b[i]=3.3;
		else
		{if(c[i]>=78)b[i]=3.0;
		else
		{if(c[i]>=75)b[i]=2.7;
		else
		{if(c[i]>=72)b[i]=2.3;
		else
		{if(c[i]>=68)b[i]=2.0;
		else
		{if(c[i]>=64)b[i]=1.5;
		else
		{if(c[i]>=60)b[i]=1.0;
		else b[i]=0;
		}
		}
		}
		}
		}
		}
		}
		}
	}
for(i=0;i<=n-1;i++)
{
sum1=sum1+a[i]*b[i];
sum2=sum2+a[i];
}
GPA=sum1/sum2;
printf("%.2f\n",GPA);
}
int main(){
	int xuefen[10],fenshu[10];
	int n;
	int a=0;
	float jidian[10],sum=0,m,GPA;
	scanf("%d",&n);
	for(int i=0;i<n;i++)
	{
		scanf("%d",&xuefen[i]);
		a+=xuefen[i];
	}
	for(int i=0;i<n;i++)
	{
		scanf("%d",&fenshu[i]);
		if(fenshu[i]>=90&&fenshu[i]<=100)
		{jidian[i]=4.0;}
		if(fenshu[i]>=85&&fenshu[i]<=89)
		{jidian[i]=3.7;}
		if(fenshu[i]>=82&&fenshu[i]<=84)
		{jidian[i]=3.3;}
		if(fenshu[i]>=78&&fenshu[i]<=81)
		{jidian[i]=3.0;}
		if(fenshu[i]>=75&&fenshu[i]<=77)
		{jidian[i]=2.7;}
		if(fenshu[i]>=72&&fenshu[i]<=74)
		{jidian[i]=2.3;}
		if(fenshu[i]>=68&&fenshu[i]<=71)
		{jidian[i]=2.0;}
		if(fenshu[i]>=64&&fenshu[i]<=67)
		{jidian[i]=1.5;}
		if(fenshu[i]>=60&&fenshu[i]<=63)
		{jidian[i]=1.0;}
		if(fenshu[i]<=60)
		{jidian[i]=0;}
		m=xuefen[i]*jidian[i];
		sum+=m;
	}
	GPA=sum/a;
	printf("%.2f",GPA);
	return 0;
}
int main(){
    int n,sz[MAX],szz[MAX],i,j,FEN;
    double szzz[MAX],f,a,SUM;
    FEN=0;
    scanf("%d",&n);
   
   for(i=0;i<n-1;i++){
   scanf("%d",&sz[i]);
   FEN=FEN+sz[i];
   }
   scanf("%d",&sz[n-1]);
   FEN=FEN+sz[n-1];
   for(j=0;j<n;j++){
       scanf("%d",&szz[j]);
       if(szz[j]>=90){
           szzz[j]=4.0;
       }
      else if (szz[j]>=85&&szz[j]<=89){
           szzz[j]=3.7;
       }
     else if(szz[j]>=82&&szz[j]<=84){
           szzz[j]=3.3;
       }
      else if(szzz[j]<=81&&szz[j]>=78){
           szzz[j]=3.0;
       }else if(szz[j]<=77&&szz[j]>=75){
           szzz[j]=2.7;
       }else if(szz[j]<=74&&szz[j]>=72){
           szzz[j]=2.3;
       }else if(szz[j]<=71&&szz[j]>=68){
           szzz[j]=2.0;
       }else if(szz[j]>=67&&szz[j]>=64){
           szzz[j]=1.5;
       }
       else if(szz[j]<=63&&szz[j]>=60){
           szzz[j]=1.0;
       }else if(szz[j]<=59){
           szzz[j]=0.0;
       }
   }
       SUM=0;
       a=0;
       for(i=0;i<n;i++){
           SUM=sz[i]*szzz[i];
           a=SUM+a;
       
       }
       
     
       
       f=a/FEN;
       printf("%.2lf",f);
       return 0;
}
int main()
{
	int n,a[10],b[10],i,j,m=0;
	double GPA,c[10],d[10],l=0;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d\n",&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)){
			c[i]=4.0;
		}


	if((b[i]>=85)&&(b[i]<=89)){
			c[i]=3.7;
		}
	if((b[i]>=82)&&(b[i]<=84)){
			c[i]=3.3;
		}
	if((b[i]>=78)&&(b[i]<=81)){
			c[i]=3.0;
		}

	if((b[i]>=75)&&(b[i]<=77)){
			c[i]=2.7;
		}
	if((b[i]>=72)&&(b[i]<=74)){
			c[i]=2.3;
		}
	if((b[i]>=68)&&(b[i]<=71)){
			c[i]=2.0;
		}
	if((b[i]>=64)&&(b[i]<=67)){
			c[i]=1.5;
		}
	if((b[i]>=60)&&(b[i]<=63)){
			c[i]=1.0;
		}
	if(b[i]<60){
			c[i]=0;
		}
	}
	for(i=0;i<n;i++){
		d[i]=c[i]*a[i];
	}
	for(i=0;i<n;i++){
		l=l+d[i];
	}
	for(j=0;j<n;j++){
		m=m+a[j];
	}
	GPA=l/(double)m;
	printf("%.2lf\n",GPA);
	return 0;
}
void main()
{
int n,i,j,f;
int a[10];
float b[10],s=0,t=0;
scanf("%d",&n);
for(i=0;i<n;i++)
{scanf("%d ",&a[i]);};
printf("\n");
for(j=0;j<n;j++)
{
scanf("%d",&f);
if(f>89)b[j]=4.0;
else if(f>84)b[j]=3.7;
else if(f>81)b[j]=3.3;
else if(f>77)b[j]=3.0;
else if(f>74)b[j]=2.7;
else if(f>71)b[j]=2.3;
else if(f>67)b[j]=2.0;
else if(f>63)b[j]=1.5;
else if (f>59)b[j]=1.0;
else b[j]=0;};
for(i=0;i<n;i++)
{s=s+a[i]*b[i];
t=t+a[i];}
s=s/t;

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





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


GPA=GPA/sum;


printf("%.2lf",GPA);
return 0;
}
void main()
{
	int a[10];
	float b[10];
	int n,i,m;
	float GPA;
	scanf("%d",&n);
	for (i=0;i<=n-1;i++)
		scanf("%d",&a[i]);
	for (i=0;i<=n-1;i++)
	{
		scanf("%d",&m);
		if (m>=90&&m<=100)
			b[i]=4.0*a[i];
		else if (m>=85&&m<=89)
			b[i]=3.7*a[i];
		else if (m>=82&&m<=84)
			b[i]=3.3*a[i];
		else if (m>=78&&m<=81)
			b[i]=3.0*a[i];
		else if (m>=75&&m<=77)
			b[i]=2.7*a[i];
		else if (m>=72&&m<=74)
			b[i]=2.3*a[i];
		else if (m>=68&&m<=71)
			b[i]=2.0*a[i];
		else if (m>=64&&m<=70)
			b[i]=1.5*a[i];
		else if (m>=60&&m<=63)
			b[i]=1.0*a[i];
		else b[i]=0;
	}
	m=0;GPA=0;
	for (i=0;i<=n-1;i++)
	{
		m=m+a[i];
		GPA=GPA+b[i];
	}
	GPA=GPA/m;
	printf("%.2f\n",GPA);
}
int main()
{
   int y[10],n,i,t,s2=0;
   float x[10],gpa,s1=0.0;
   scanf("%d",&n);
   for(i=0;i<n;i++)
   {
      scanf("%d",&y[i]);
      s2+=y[i]; 
                     
   } 
   for(i=0;i<n;i++)
   {
      scanf("%d",&t);
      if(t>=90&&t<=100)
         x[i]=4.0 ;
      else if(t>=85&&t<=89)
         x[i]=3.7 ; 
      else if(t>=82&&t<=84)
         x[i]=3.3 ;
      else if(t>=78&&t<=81)
         x[i]=3.0 ; 
      else if(t>=75&&t<=77)
         x[i]=2.7 ;
      else if(t>=72&&t<=74)
         x[i]=2.3 ;
      else if(t>=68&&t<=71)
         x[i]=2.0 ;
      else if(t>=64&&t<=67)
         x[i]=1.5 ;
      else if(t>=60&&t<=63)
         x[i]=1.0 ;
      else
         x[i]=0.0;                         
   }
   for(i=0;i<n;i++)
   {
      s1+=x[i]*y[i];                
   }
   gpa=s1/s2;
   printf("%.2f",gpa);
   scanf("%d",&n);
   return 0;  
}
int Xuefen(int xuefen[], int n){
    int sumxuefen=0;
    for(int i=0;i<n;i++){
         sumxuefen=sumxuefen+xuefen[i];   
    }
    return sumxuefen;
}
double Jidian(int defen[], int xuefen[], int n){
    double sumjidian=0;
    double jidian[1000];
    for(int i=0;i<n;i++){
        if(defen[i]>=90&&defen[i]<=100){
            jidian[i]=4.0*xuefen[i];
        }
        if(defen[i]>=85&&defen[i]<=89){
            jidian[i]=3.7*xuefen[i];
        }
        if(defen[i]>=82&&defen[i]<=84){
            jidian[i]=3.3*xuefen[i];
        }
        if(defen[i]>=78&&defen[i]<=81){
            jidian[i]=3.0*xuefen[i];
        }
        if(defen[i]>=75&&defen[i]<=77){
            jidian[i]=2.7*xuefen[i];
        }
        if(defen[i]>=72&&defen[i]<=74){
            jidian[i]=2.3*xuefen[i];
        }
        if(defen[i]>=68&&defen[i]<=71){
            jidian[i]=2.0*xuefen[i];
        }
        if(defen[i]>=64&&defen[i]<=67){
            jidian[i]=1.5*xuefen[i];
        }
        if(defen[i]>=60&&defen[i]<=63){
            jidian[i]=1.0*xuefen[i];
        }
        if(defen[i]<=60){
            jidian[i]=1.0*0*xuefen[i];
        }
    }
    for(int i=0;i<n;i++){
        sumjidian+=jidian[i];
    }
    return sumjidian;
}
int main(){
    int n;
    double p,q;
    double GPA;
    scanf("%d",&n);
    int xuefen[100];
    int defen[101];
    for(int i=0;i<n;i++){
        scanf("%d",&xuefen[i]);
    }
    for(int i=0;i<n;i++){
        scanf("%d",&defen[i]);
    }
    p=Jidian(defen,xuefen,n);
    q=1.0*Xuefen(xuefen,n);
    printf("%.2lf",p/q);
    return 0;
}
int main()
{
	int n;
	int a[10],b[10];
	double c[10],s1=0.0,s2=0.0,av;
	scanf("%d",&n);
	int i;
	
	for(i=0;i<n;i++){
		scanf("%d",&b[i]);
		s1=s1+b[i];
	}
  

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

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

	return 0;
}
void main()
{
	int n,m,sum,*q;
	float *w,sum2=0,gpa;
	scanf("%d",&n);
	q=(int*)malloc(sizeof(int)*n);
	w=(float*)malloc(sizeof(float)*n);
    for(m=0,sum=0;m<n;m++)
	{ 	
		scanf("%d",q+m);
		sum=sum+*(q+m);
	} 
	for(m=0;m<n;m++)
	{
		scanf("%f",w+m);
		if(*(w+m)<=100&&*(w+m)>=90)	sum2=sum2+4.0**(q+m); 
		else if(*(w+m)<=89&&*(w+m)>=85)	sum2=sum2+3.7**(q+m); 
		else if(*(w+m)<=84&&*(w+m)>=82)	sum2=sum2+3.3**(q+m);
		else if(*(w+m)<=81&&*(w+m)>=78)	sum2=sum2+3.0**(q+m); 
		else if(*(w+m)<=77&&*(w+m)>=75)	sum2=sum2+2.7**(q+m); 
		else if(*(w+m)<=75&&*(w+m)>=72)	sum2=sum2+2.3**(q+m); 
		else if(*(w+m)<=71&&*(w+m)>=68)	sum2=sum2+2.0**(q+m); 
		else if(*(w+m)<=67&&*(w+m)>=64)	sum2=sum2+1.5**(q+m); 
		else if(*(w+m)<=63&&*(w+m)>=60)	sum2=sum2+1.0**(q+m); 
		else if(*(w+m)<=59)	sum2=sum2+0.0**(q+m); 
	} 
	gpa=sum2/sum;
	printf("%.2f",gpa);
	return;
}
int main(){
	int n;
	int i;
	double e;
	double k;
	double f;
	double a;
	double GPA;
	int sz[10];
	int xb[10];
	scanf("%d",&n);
	k=0;
	e=0;
	a=0;
	f=0;
	for(i=0;i<n;i++){
		scanf("%d",&sz[i]);
	}
	for(i=0;i<n;i++){
        scanf("%d",&xb[i]);
	}
	for(i=0;i<n;i++){
		k=k+sz[i];
	}
	for(i=0;i<n;i++){
		if(xb[i]>=90){
			e=4.0;
		}else if(xb[i]>=85&&xb[i]<90){
			e=3.7;
		}else if(xb[i]>=82&&xb[i]<85){
			e=3.3;
		}else if(xb[i]>=78&&xb[i]<82){
			e=3.0;
		}else if(xb[i]>=75&&xb[i]<78){
			e=2.7;
		}else if(xb[i]>=72&&xb[i]<75){
			e=2.3;
		}else if(xb[i]>=68&&xb[i]<72){
			e=2.0;
		}else if(xb[i]>=64&&xb[i]<68){
			e=1.5;
		}else if(xb[i]>=60&&xb[i]<64){
			e=1.0;
		}else{
			e=0;
		}
	    f=e*sz[i];
		a+=f;
	}
	GPA=a/k;
	printf("%.2f",GPA);
         return 0;
}
int main()
{
	int a[10],b[10],n,i,m=0;
	float GPA,c[10],sum=0.0;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
		m=m+a[i];
	}
	for(i=0;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.0;
	}
	for(i=0;i<n;i++)
		sum=sum+a[i]*c[i];
    GPA=sum/m;
    printf("%.2f\n",GPA);
	return 0;
}
int main(){
int n;
scanf("%d",&n);
float sum=0;
int a;
double m=0;
int i=1;
int b;
double c;
double d;

int score[100];
while(i<=n)
{
	scanf("%d",&a);
	score[i]=a;
    m+=a;
	i++;
}
   int j=1;
while(j<=n)
{
	scanf("%d",&b);
	if(b>89){c=4.0;}
	else if(b>84){c=3.7;}
else if(b>81){c=3.3;}
else if(b>77){c=3.0;}
else if(b>74){c=2.7;}
else if(b>71){c=2.3;}
else if(b>67){c=2.0;}
else if(b>63){c=1.5;}
else if(b>59){c=1.0;}
else {c=0;}
sum+=c*score[j];
j++;
}
d=sum/m;
printf("%.2lf",d);
return 0;
}
int main()
{
    int n,score[10],i,grade[10],zongfen=0;
    double zong=0,jidian[10];
    scanf("%d\n",&n);
    for(i=0;i<n-1;i++)
    scanf("%d ",&grade[i]);
    scanf("%d\n",&grade[n-1]);
    for(i=0;i<n-1;i++)
    scanf("%d ",&score[i]);
    scanf("%d",&score[n-1]);
    for(i=0;i<n;i++)
    {
	if(90<=score[i]&&score[i]<=100)
	jidian[i]=4.0*grade[i];
	else if(85<=score[i]&&score[i]<=89)
         jidian[i]=3.7*grade[i];
	else if(82<=score[i]&&score[i]<=84)
	jidian[i]=3.3*grade[i];
	else if(78<=score[i]&&score[i]<=81)
	jidian[i]=3.0*grade[i];
	else if(75<=score[i]&&score[i]<=77)
	jidian[i]=2.7*grade[i];
	else if(72<=score[i]&&score[i]<=74)
	jidian[i]=2.3*grade[i];
	else if(68<=score[i]&&score[i]<=71)
	jidian[i]=2.0*grade[i];
	else if(64<=score[i]&&score[i]<=67)
	jidian[i]=1.5*grade[i];
	else if(60<=score[i]&&score[i]<=63)
	jidian[i]=1.0*grade[i];
	else if(score[i]<60)
	jidian[i]=0*grade[i];
	zong+=jidian[i];
	zongfen+=grade[i];
    }
         double GPA=zong/zongfen;
         printf("%.2lf\n",GPA);
         return 0;
}
int main()
{float a[101]={0},gpa,sumjidian=0,sumxuefen=0;
 int i,n,b[101],c[101];
 for (i=60;i<=63;i++) a[i]=1.0;
 for (i=64;i<=67;i++) a[i]=1.5;
 for (i=68;i<=71;i++) a[i]=2.0;
 for (i=72;i<=74;i++) a[i]=2.3;
 for (i=75;i<=77;i++) a[i]=2.7;
 for (i=78;i<=81;i++) a[i]=3.0;
 for (i=82;i<=84;i++) a[i]=3.3;
 for (i=85;i<=89;i++) a[i]=3.7; 
 for (i=90;i<=100;i++) a[i]=4.0;  
 scanf("%d",&n);
 for (i=0;i<n;i++)  {scanf("%d",&b[i]);sumxuefen=sumxuefen+b[i];}
 for (i=0;i<n;i++)  
   {scanf("%d",&c[i]);
    sumjidian=sumjidian+a[c[i]]*b[i];                  
   }  
 gpa=sumjidian/sumxuefen;
 printf("%.2f",gpa);
 scanf("\n");
    
    
    
    
}
int main()
{
    int n,i,j;
    int a[11]={0};
    int b[11]={0};
    float c[11]={0};
    int d[11]={0,1,2,3,4,5,6,7,8,9,10};
    while(scanf("%d",&n)!=EOF)
    {
        float sum=0;
        int asum=0;
         for(i=1;i<=n;i++)
         {
             scanf("%d",&a[i]);
             asum+=a[i];
         }
         for(i=1;i<=n;i++)
         {
              scanf("%d",&b[i]);
         }
         for(i=1;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 c[i]=0;
         }
         for(i=1;i<=n;i++)
         {
              sum+=a[i]*c[i];
         }
         printf("%.2f\n",sum/asum);
         
         
    }
    
    return 0;
}
int main()
{
	int n,i,j;
	int s[2][10];
    scanf("%d",&n);
	for(i=0;i<2;i++){
		for(j=0;j<n;j++){
			scanf("%d", &s[i][j]);
		}
	}
    float A[10];
	float B[10];
	int sum=0;
	for(i=0;i<n;i++){
		sum += s[0][i];
	}
	for(i=0;i<n;i++){
		if(s[1][i]>=90)
			A[i]=4.0;
		else if(s[1][i]>=85)
			A[i]=3.7;
		else if(s[1][i]>=82)
			A[i]=3.3;
		else if(s[1][i]>=78)
			A[i]=3.0;
		else if(s[1][i]>=75)
			A[i]=2.7;
		else if(s[1][i]>=72)
			A[i]=2.3;
        else if(s[1][i]>=68)
			A[i]=2.0;
        else if(s[1][i]>=64)
			A[i]=1.5;
        else if(s[1][i]>=60)
			A[i]=1.0;
        else if(s[1][i]<60)
			A[i]=0;
	}
	float gpa,GPA;
	for(i=0;i<n;i++){
		B[i]=A[i]*s[0][i];
		gpa += B[i];
	}
	GPA=gpa/sum;
    printf("%.2f", GPA);
	return 0;
}
int main(){
    int num_classes;
    cin>>num_classes;
    int pts[10];
    for(int i = 0; i < num_classes; i++){
        cin>>pts[i];
    }
    int total_score = 0;
    int total_credits = 0;
    int tmp;
    for(int i = 0; i < num_classes; i++){
        cin>>tmp;
        total_credits += pts[i];
        if(tmp >= 90)
            total_score += 40 * pts[i];
        else if(tmp >= 85)
            total_score += 37 * pts[i];
        else if(tmp >= 82)
            total_score += 33 * pts[i];
        else if(tmp >= 78)
            total_score += 30 * pts[i];
        else if(tmp >= 75)
            total_score += 27 * pts[i];
        else if(tmp >= 72)
            total_score += 23 * pts[i];
        else if(tmp >= 68)
            total_score += 20 * pts[i];
        else if(tmp >= 64)
            total_score += 15 * pts[i];
        else if(tmp >= 60)
            total_score += 10 * pts[i];
    }
    printf("%.2f",(float)total_score / (float)(total_credits * 10));
}
int main()
{
	int n,i;
	double gpa,jd[10],xuefenjd[10],xuefen[10],defen[10],sum1=0.0,sum2=0.0;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%lf",&(xuefen[i]));
	}
	for(i=0;i<n;i++){
		scanf("%lf",&(defen[i]));
	}
	for(i=0;i<n;i++){
		if(defen[i]>=90&&defen[i]<=100)
			jd[i]=4.0;
		if(defen[i]>=85&&defen[i]<=89)
			jd[i]=3.7;
		if(defen[i]>=82&&defen[i]<=84)
			jd[i]=3.3;
		if(defen[i]>=78&&defen[i]<=81)
			jd[i]=3.0;
		if(defen[i]>=75&&defen[i]<=77)
			jd[i]=2.7;
		if(defen[i]>=72&&defen[i]<=74)
			jd[i]=2.3;
		if(defen[i]>=68&&defen[i]<=71)
			jd[i]=2.0;
		if(defen[i]>=64&&defen[i]<=67)
			jd[i]=1.5;
		if(defen[i]>=60&&defen[i]<=63)
			jd[i]=1.0;
		if(defen[i]<60)
			jd[i]=0.0;
		xuefenjd[i]=1.0*xuefen[i]*jd[i];
		sum1+=xuefen[i];
		sum2+=xuefenjd[i];
	}
	gpa=1.0*sum2/sum1;
	printf("%.2lf\n",gpa);
	return 0;
}
int main()
{
   int i,num;
   double sz[10],sz1[10],sz2[10],sum, result,GPA;
   scanf("%d", &num);
   for(i=0;i<num;i++)
   {
                     scanf("%lf", &sz[i]);
                     }
   for(i=0;i<num;i++)
   {
                     scanf("%lf", &sz1[i]);
                     }
   for(i=0;i<num;i++)
   {
                     if(sz1[i]>=90)
                     {
                                   sz2[i]=4.0;
                     }
                     else if(sz1[i]>=85)
                     {
                                   sz2[i]=3.7;
                     }
                     else if(sz1[i]>=82)
                     {
                                   sz2[i]=3.3;
                     }
                     else if(sz1[i]>=78)
                     {
                                   sz2[i]=3.0;
                     }
                     else if(sz1[i]>=75)
                     {
                                   sz2[i]=2.7;
                     }
                     else if(sz1[i]>=72)
                     {
                                   sz2[i]=2.3;
                     }
                     else if(sz1[i]>=68)
                     {
                                   sz2[i]=2.0;
                     }
                     else if(sz1[i]>=64)
                     {
                                   sz2[i]=1.5;
                     }
                     else if(sz1[i]>=60)
                     {
                                   sz2[i]=1.0;
                     }
                    else
                     {
                                   sz2[i]=0;
                     }
                     }
   result=0;
   sum=0;
   //for(i=0;i<num;i++)
   //printf("%.2lf %.2lf\n", sz1[i], sz2[i]);
   for(i=0;i<num;i++)
   {
                     result=result+sz2[i]*sz[i];
                     sum=sum+sz[i];
                     }
   //printf("%.2lf %.2lf", result, sum);
  GPA=result/sum;
   printf("%.2lf", GPA);
   scanf(" ");
   return 0;
}
int main(){
int n,i;
scanf("%d",&n);
int score[10];
int grade[10];
int a=0;
int b=0;
double c=0;
double d=0;
for(i=0;i<n;i++){
	scanf("%d",&score[i]);
	a+=score[i];
}
for(i=0;i<n;i++){
	scanf("%d",&grade[i]);
if(90<=grade[i]){c+=score[i]*4.0;}
else if(85<=grade[i]){c+=score[i]*3.7;}
else if(82<=grade[i]){c+=score[i]*3.3;}
else if(78<=grade[i]){c+=score[i]*3.0;}
else if(75<=grade[i]){c+=score[i]*2.7;}
else if(72<=grade[i]){c+=score[i]*2.3;}
else if(68<=grade[i]){c+=score[i]*2.0;}
else if(64<=grade[i]){c+=score[i]*1.5;}
else if(60<=grade[i]){c+=score[i]*1.0;}
else{c+=score[i]*0;}
}

d=c/a;

printf("%.2lf",d);
return 0;
}