semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
void main()
{
	int i,n,a[101],b[101],sum=0;
	float gpa=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){
		gpa+=4*a[i];	
		}
		else if(b[i]>=85&&b[i]<=89){

			gpa+=3.7*a[i];
		}
		else if(b[i]>=82&&b[i]<=84){
			gpa+=3.3*a[i];
		}
		else if(b[i]>=78&&b[i]<=81){
			gpa+=3.0*a[i];
		}
		else if(b[i]>=75&&b[i]<=77){
			gpa+=2.7*a[i];
		}
		else if(b[i]>=72&&b[i]<=74){
			gpa+=2.3*a[i];
		}
		else if(b[i]>=68&&b[i]<=71){
			gpa+=2.0*a[i];
		}
		else if(b[i]>=64&&b[i]<=67){
			gpa+=1.5*a[i];
		}
		else if(b[i]>=60&&b[i]<=63){
			gpa+=1.0*a[i];
		}
	}
	for(i=0;i<n;i++){
		sum+=a[i];
	}
	printf("%.2f\n",gpa/sum);
}
int main(){

int s,i,z=0,q,n,w;
float a=0,d;
scanf("%d",&n);int grade[n],num[n];float g[n];
for(i=0;i<n;i++){
                  scanf("%d",&num[i]);
                  }for(i=0;i<n;i++)
                  {scanf("%d",&grade[i]);}
for(i=0;i<n;i++){
          if(grade[i]<101&&grade[i]>89)g[i]=4.0;
    if(grade[i]<90&&grade[i]>84)
    g[i]=3.7;if(grade[i]<85&&grade[i]>81)
    g[i]=3.3;if(grade[i]<82&&grade[i]>77)
    g[i]=3.0;if(grade[i]<78&&grade[i]>74)
    g[i]=2.7;if(grade[i]<75&&grade[i]>71)
    g[i]=2.3;if(grade[i]<72&&grade[i]>67)
    g[i]=2.0;if(grade[i]<68&&grade[i]>63)
    g[i]=1.5;if(grade[i]<64&&grade[i]>59)
    g[i]=1.0;if(grade[i]<60)
    g[i]=0;}
    for(i=0;i<n;i++){
              a+=g[i]*num[i];
              z+=num[i];
              }       
               d=a/z;
               printf("%.2f",d);                

return 0;}
int main()
{
	int i,n,xf[10],df[10],zxf=0;
	float xfjd[10],zxfjd=0,gpa;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&xf[i]);
		zxf=zxf+xf[i];
	}
	for(i=0;i<n;i++)
	{
		scanf("%d",&df[i]);
		if(df[i]<=100&&df[i]>89) xfjd[i]=4.0;
		if(df[i]<=89&&df[i]>84) xfjd[i]=3.7;
		if(df[i]<=84&&df[i]>81) xfjd[i]=3.3;
		if(df[i]<=81&&df[i]>77) xfjd[i]=3.0;
		if(df[i]<=77&&df[i]>74) xfjd[i]=2.7;
		if(df[i]<=74&&df[i]>71) xfjd[i]=2.3;
		if(df[i]<=71&&df[i]>67) xfjd[i]=2.0;
		if(df[i]<=67&&df[i]>63) xfjd[i]=1.5;
		if(df[i]<=63&&df[i]>59) xfjd[i]=1.0;
		if(df[i]<=59) xfjd[i]=0;
		zxfjd=zxfjd+xfjd[i]*xf[i];
	}
	gpa=zxfjd/zxf;
	printf("%.2f\n",gpa);
}
int main()
{
	int n,i,K=0;
	double G,S=0;
	int a[100];
	int b[100];
	double c[100];
	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.0;
		}
	}
	for(i=0;i<n;i++){
		S=S+1.0*a[i]*c[i];
	}
	for(i=0;i<n;i++){
		K=K+a[i];
	}
	G=1.0*S/K;
	printf("%.2lf",G);
	return 0;
}
int main()
{
	int a[10],b[10],n,d=0;
	float sum = 0,c[10];
    float GPA=0;
	scanf("%d",&n);
    
	for(int i=0;i<n;i++)
	{	
		scanf("%d",&a[i]);
		d+=a[i];
	}
    for(int m=0;m<n;m++)
	{	
		  scanf("%d",&b[m]);
		  if(b[m]>=90)
		  {
			  c[m]=4.0;
		  }
		  else if(b[m]>=85&&b[m]<90)
		  {
              c[m]=3.7;
		  }
          else if(b[m]>=82&&b[m]<85)
		  {
              c[m]=3.3;
		  }
          else if(b[m]>=78&&b[m]<82)
		  {
              c[m]=3.0;
		  }
          else if(b[m]>=75&&b[m]<78)
		  {
              c[m]=2.7;
		  }

          else if(b[m]>=72&&b[m]<75)
		  {
              c[m]=2.3;
		  }
          else if(b[m]>=68&&b[m]<72)
		  {
              c[m]=2.0;
		  }

          else if(b[m]>=64&&b[m]<68)
		  {
              c[m]=1.5;
		  }

          else if(b[m]>=60&&b[m]<64)
		  {
              c[m]=1.0;
		  }
		  else{
			  c[m]=0;
		  }
	}
    for(int k=0;k<n;k++)
	{
		sum+=(float)c[k]*a[k];
	}
	GPA=(float)(sum/d);	
	
	printf("%.2f\n",GPA);
    return 0;
}
int main()
{
int n,i;
float b[10], a[10],c[10],GPA,sum1=0,sum2=0;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%f",&a[i]);
}
for(i=0;i<n;i++)
{
scanf("%f",&b[i]);
        if(90<=b[i])
  	    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;
		sum1+=c[i]*a[i];
        sum2+=a[i];
}
GPA=sum1/sum2;
printf("%.2lf",GPA);
return 0;
}
int main(){
      int n,i,x; 
      float y,c,d,GPA;
      int a[num],b[num];
      x=0;
      c=0;
      d=0;
      scanf("%d",&n);
      for(i=0;i<n;i++){
         scanf("%d",&a[i]);
         x=x+a[i];
     }
     for(i=0;i<n;i++){
         scanf("%d",&b[i]);
     }
     for(i=0;i<n;i++){
       if(b[i]>=90){
         y=4.0;
       }else if(b[i]>=85){
         y=3.7;
       }else if(b[i]>=82){
         y=3.3;
       }else if(b[i]>=78){
         y=3.0;
       }else if(b[i]>=75){
         y=2.7;
       }else if(b[i]>=72){
         y=2.3;
       }else if(b[i]>=68){
         y=2.0;
       }else if(b[i]>=64){
         y=1.5;
       }else if(b[i]>=60){
         y=1.0;
       }else{
         y=0;
       }
       c=y*a[i];
       d=d+c;
     }  
     GPA=d/x;
     printf("%.2f",GPA);
     return 0;
}
void main()
{
	int a[10],b[10],n,i,s;
	float c[10],GPA;
	scanf("%d",&n);
	i=1;
	while(i<=n)
	{
		scanf("%d",&a[i]);
		i=i+1;
	}
	i=1;
	while(i<=n)
	{
		scanf("%d",&b[i]);
		if(b[i]>=90&&b[i]<=100)
			c[i]=4;
		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;
		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;
		else if(b[i]>=64)
			c[i]=1.5;
		else if(b[i]>=60)
			c[i]=1;
		else c[i]=0;
		i=i+1;
	}
	i=1;
	GPA=0;
	s=0;
	while(i<=n)
	{
		GPA=GPA+a[i]*c[i];
		s=s+a[i];
		i=i+1;
	}
	GPA=GPA/(float)s;
	printf("%.2f",GPA);
}
int main()
{
	float*xuefen;
	float*chengji;
	float*GPA;
	float xf,cj,xuefensum=0,GPAsum=0;
	int n,i;
	scanf("%d",&n);
	xuefen=(float*)malloc(sizeof(float)*n);
	chengji=(float*)malloc(sizeof(float)*n);
	GPA=(float*)malloc(sizeof(float)*n);
	for(i=0;i<n;i++)
	{
		scanf("%f",&xf);
		*(xuefen+i)=xf;
	}
	for(i=0;i<n;i++)
	{
		scanf("%f",&cj);
		*(chengji+i)=cj;
	}
    for(i=0;i<n;i++)
	{
		if(*(chengji+i)>=90&&*(chengji+i)<=100)
		{
			*(GPA+i)=4.0;
		}
		else if(*(chengji+i)>=85&&*(chengji+i)<=89)
		{
			*(GPA+i)=3.7;
		}
		else if(*(chengji+i)>=82&&*(chengji+i)<=84)
		{
			*(GPA+i)=3.3;
		}
		else if(*(chengji+i)>=78&&*(chengji+i)<=81)
		{
			*(GPA+i)=3.0;
		}
		else if(*(chengji+i)>=75&&*(chengji+i)<=77)
		{
			*(GPA+i)=2.7;
		}
		else if(*(chengji+i)>=72&&*(chengji+i)<=74)
		{
			*(GPA+i)=2.3;
		}
		else if(*(chengji+i)>=68&&*(chengji+i)<=71)
		{
			*(GPA+i)=2.0;
		}
		else if(*(chengji+i)>=64&&*(chengji+i)<=67)
		{
			*(GPA+i)=1.5;
		}
		else if(*(chengji+i)>=60&&*(chengji+i)<=63)
		{
			*(GPA+i)=1.0;
		}
		else
		{
			*(GPA+i)=0;
		}
	}
	for(i=0;i<n;i++)
	{
		GPAsum+=(*(GPA+i))*(*(xuefen+i));
	}
	for(i=0;i<n;i++)
	{
		xuefensum+=*(xuefen+i);
	}
	printf("%.2f\n",GPAsum/xuefensum);
	return 0;
}
int main(){
	int xf[10],df[10];
	int n,i,f;
	float j,z,jd[10];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		f=0;
		scanf("%d",&(xf[i]));
	}for(i=0;i<n;i++){
	    scanf("%d",&(df[i]));
		j=0;
		if(df[i]>=90 && df[i]<=100){
			jd[i]=4.0*xf[i];
		}if(df[i]>=85 && df[i]<=89){
			jd[i]=3.7*xf[i];
		}if(df[i]>=82 && df[i]<=84){
			jd[i]=3.3*xf[i];
		}if(df[i]>=78 && df[i]<=81){
			jd[i]=3.0*xf[i];
		}if(df[i]>=75 && df[i]<=77){
			jd[i]=2.7*xf[i];
		}if(df[i]>=72 && df[i]<=74){
			jd[i]=2.3*xf[i];
		}if(df[i]>=68 && df[i]<=71){
			jd[i]=2.0*xf[i];
		}if(df[i]>=64 && df[i]<=67){
			jd[i]=1.5*xf[i];
		}if(df[i]>=60 && df[i]<=63){
			jd[i]=1.0*xf[i];
		}if(df[i]<60){
			jd[i]=0;
		}
	}for(i=0;i<n;i++){
		f+=xf[i];
		j+=jd[i];
	}z=j/f;
	printf("%.2f",z);
	return 0;
}
void main(){
	double c[10], s[10], p[10], tc=0, tp=0, GPA;
	int i, n;
	scanf("%d", &n);
	for (i=0; i<n; i++)
	{
		scanf("%lf", &c[i]);
		tc=tc+c[i];
	}
	for (i=0; i<n; i++)
	{
		scanf("%lf", &s[i]);
		if (s[i]<60) p[i]=0;
		else if (s[i]>=60 && s[i]<=63) p[i]=1.0*c[i];
		else if (s[i]>=64 && s[i]<=67) p[i]=1.5*c[i];
		else if (s[i]>=68 && s[i]<=71) p[i]=2.0*c[i];
		else if (s[i]>=72 && s[i]<=74) p[i]=2.3*c[i];
		else if (s[i]>=75 && s[i]<=77) p[i]=2.7*c[i];
		else if (s[i]>=78 && s[i]<=81) p[i]=3.0*c[i];
		else if (s[i]>=82 && s[i]<=84) p[i]=3.3*c[i];
		else if (s[i]>=85 && s[i]<=89) p[i]=3.7*c[i];
		else p[i]=4.0*c[i];
		tp=tp+p[i];
	}
	GPA=tp/tc;
	printf("%.2lf", GPA);
}
float a[10];
int b[10];
float c[10];
float d[10];
int main()
{
	int n,i,j;
	float GPA,sum,pts;
	GPA=0;
	sum=0;
	pts=0;
	scanf("%d", &n);
	for(j=0;j<n;j++)
	{
		scanf("%f", &a[j]);
		pts+=a[j];
	}
	for(i=0;i<n;i++)
	{
		scanf("%d", &b[i]);
		switch(b[i])
		{
		case 60:
			c[i]=1;
			break;
case 61:
			c[i]=1;
			break;
case 62:
			c[i]=1;
			break;
case 63:
			c[i]=1;
			break;
case 64:
			c[i]=1.5;
			break;
case 65:
			c[i]=1.5;
			break;
case 66:
			c[i]=1.5;
			break;
case 67:
			c[i]=1.5;
			break;
case 68:
			c[i]=2;
			break;
case 69:
			c[i]=2;
			break;
case 70:
			c[i]=2;
			break;
case 71:
			c[i]=2;
			break;
case 72:
			c[i]=2.3;
			break;
case 73:
			c[i]=2.3;
			break;
case 74:
			c[i]=2.3;
			break;
case 75:
			c[i]=2.7;
			break;
case 76:
			c[i]=2.7;
			break;
case 77:
			c[i]=2.7;
			break;
case 78:
			c[i]=3;
			break;
case 79:
			c[i]=3;
			break;
case 80:
			c[i]=3;
			break;
case 81:
			c[i]=3;
			break;
case 82:
			c[i]=3.3;
			break;
case 83:
			c[i]=3.3;
			break;
case 84:
			c[i]=3.3;
			break;
case 85:
			c[i]=3.7;
			break;
case 86:
			c[i]=3.7;
			break;
case 87:
			c[i]=3.7;
			break;
case 88:
			c[i]=3.7;
			break;
case 89:
			c[i]=3.7;
			break;
case 90:
			c[i]=4;
			break;
case 91:
			c[i]=4;
			break;
case 92:
			c[i]=4;
			break;
case 93:
			c[i]=4;
			break;
case 94:
			c[i]=4;
			break;
case 95:
			c[i]=4;
			break;
case 96:
			c[i]=4;
			break;
case 97:
			c[i]=4;
			break;
case 98:
			c[i]=4;
			break;
case 99:
			c[i]=4;
			break;
case 100:
			c[i]=4;
			break;
default:
			c[i]=0;
			break;
		}
		d[i]=c[i]*a[i];
		sum+=d[i];
	}
	GPA=sum/pts;
	printf("%.2f", GPA);
	return 0;
}
float grade(int*p2)
{
	float n;
	if(*p2>=90&&*p2<=100)
		n=4.0f;
	else if(*p2>=85&&*p2<=89)
		n=3.7f;
	else if(*p2>=82&&*p2<=84)
		n=3.3f;
	else if(*p2>=78&&*p2<=81)
		n=3.0f;
	else if(*p2>=75&&*p2<=77)
		n=2.7f;
	else if(*p2>=72&&*p2<=74)
		n=2.3f;
	else if(*p2>=68&&*p2<=71)
		n=2.0f;
	else if(*p2>=64&&*p2<=67)
		n=1.5f;
	else if(*p2>=60&&*p2<=63)
		n=1.0f;
	else
		n=0;
	return (n);
}
void main()
{
	int i,n,num=0,a[10],b[10],*p1,*p2;
	float c[10];
	float GPA=0;
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d",&a[i]);
	for(i=0;i<n;i++)
		scanf("%d",&b[i]);
	p1=&a[0];p2=&b[0];
	for(i=0;i<n;i++)
		{
			c[i]=(*p1)*(grade(p2));
			p1++;
			p2++;
		}
	for(i=0;i<n;i++)
		{
			GPA+=c[i];
			num+=a[i];
		}
	printf("%.2f\n",GPA/num);
	
}
int main()
{
	
	int i,j,e,f,d,h;
    int k,m,n;
	float x[1000],y[1000],a,b,c;
	char z[1000];
	d=0;
	a=0;
	b=0;
	e=0;
	scanf("%d",&n);
	for(i=1;i<=n;i++){
	scanf("%f",&x[i]);
	a+=x[i];
	}
	i=0;
	for(i=1;i<=n;i++){
		scanf("%f",&y[i]);
	if(y[i]<=59)y[i]=0;
	if(y[i]>=90)y[i]=4.0;
	if(y[i]<=89&&y[i]>=85)y[i]=3.7;
	if(y[i]<=84&&y[i]>=82)y[i]=3.3;
	if(y[i]<=81&&y[i]>=78)y[i]=3.0;
	if(y[i]<=77&&y[i]>=75)y[i]=2.7;
	if(y[i]<=74&&y[i]>=72)y[i]=2.3;
	if(y[i]<=71&&y[i]>=68)y[i]=2.0;
	if(y[i]<=67&&y[i]>=64)y[i]=1.5;
	if(y[i]<=63&&y[i]>=60)y[i]=1.0;
	b+=x[i]*y[i];
	}
	c=b/a;
	printf("%.2f",c);
	return 0;
}
int main()
{
	int i,j,n,point[11],score[11];
	float GPA[11],tol=0,sum=0,result;
	scanf("%d",&n);


	for(i=1;i<n+1;i++)
	{
		scanf("%d",&point[i]);

		sum=sum+point[i];
	}
	for(i=1;i<n+1;i++)
	{
		scanf("%d",&score[i]);
        if(score[i]>=90)   GPA[i]=4.0;
		else if(score[i]>=85) GPA[i]=3.7;
		else if(score[i]>=82) GPA[i]=3.3;
		else if(score[i]>=78) GPA[i]=3.0;
		else if(score[i]>=75) GPA[i]=2.7;
		else if(score[i]>=72) GPA[i]=2.3;
		else if(score[i]>=68) GPA[i]=2.0;
		else if(score[i]>=64) GPA[i]=1.5;
		else if(score[i]>=60) GPA[i]=1.0;
		else  GPA[i]=0;
		tol=tol+GPA[i]*point[i];
	}




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

}
for (i=1;i<=n;i++)
{
c[i]=c[i]*a[i];
}
for (i=1;i<=n;i++)
{
d=d+c[i];
m=m+a[i];
}
g=d/m;
printf("%.2f",g);

return 0;
}
void main()
{
 int n,a[10],b[10],i,j;
 float GPA;
 double c[10],s,r;
 scanf("%d",&n);
 for(i=0;i<n;i++)
  scanf("%d",&a[i]);
 for(j=0;j<n;j++)
  scanf("%d",&b[j]);
 i=0;
 s=0;
 while(i<n)
 {
  if(b[i]>89&&b[i]<=100)
  c[i]=4.0;
 else if(b[i]>84&&b[i]<90)
  c[i]=3.7;
 else if(b[i]>81&&b[i]<85)
  c[i]=3.3;
 else if(b[i]>77&&b[i]<82)
  c[i]=3.0;
 else if(b[i]>74&&b[i]<78)
  c[i]=2.7;
 else if(b[i]>71&&b[i]<75)
  c[i]=2.3;
 else if(b[i]>67&&b[i]<72)
  c[i]=2.0;
 else if(b[i]>63&&b[i]<68)
  c[i]=1.5;
 else if(b[i]>59&&b[i]<64)
  c[i]=1.0;
 else c[i]=0;
 s=s+c[i]*(a[i]+0.0);
 i++;
 }
 r=0;
 for(i=0;i<n;i++)
  r=r+a[i];
 GPA=s/r;
 printf("%.2f",GPA);
}
int main(){
int xf[10],cj[10],n,j,i;
double dkjd[10],m=0,q=0,x;
scanf("%d",&n);
 for(i=0;i<n;i++)
       scanf("%d",&(xf[i]));
for(i=0;i<n;i++)
         scanf("%d",&(cj[i]));
for(i=0;i<n;i++){
    if(cj[i]>=90&&cj[i]<=100){
        dkjd[i]=4.0;
    }else  if(cj[i]>=85&&cj[i]<=89){
        dkjd[i]=3.7;
    }else  if(cj[i]>=82&&cj[i]<=84){
        dkjd[i]=3.3;
    }else  if(cj[i]>=78&&cj[i]<=81){
        dkjd[i]=3.0;
    }else  if(cj[i]>=75&&cj[i]<=77){
        dkjd[i]=2.7;
    }else  if(cj[i]>=72&&cj[i]<=74){
        dkjd[i]=2.3;
    }else  if(cj[i]>=68&&cj[i]<=71){
        dkjd[i]=2.0;
    }else  if(cj[i]>=64&&cj[i]<=67){
        dkjd[i]=1.5;
    }else  if(cj[i]>=60&&cj[i]<=63){
        dkjd[i]=1.0;
    }else  if(cj[i]>=0&&cj[i]<=60){
        dkjd[i]=0.0;
    }
x=dkjd[i]*xf[i];
         m+=x;
         q+=xf[i];
     }  
     m=m/q;
    printf("%.2lf",m);
    return 0;
}
int main(){
  int n,i,j,m;
  int a[10],b[10];
  float GPA,e[10],k,p;
  scanf("%d\n",&n);
  for(i=0;i<n-1;i++){
   scanf("%d ",&a[i]);
   }
  scanf("%d\n",&a[n-1]);
  scanf("%d",&b[0]);
  for(i=1;i<n;i++){
   scanf(" %d",&b[i]);
  }
 for(m=0,i=0;i<n;i++){
  m+=a[i];
    }
  for(i=0,k=0;i<n;i++){
    if(b[i]>=90&&b[i]<=100){
      e[i]=4.0;
   }
    if(b[i]>=85&&b[i]<=89){
      e[i]=3.7;
   }
     if(b[i]>=82&&b[i]<=84){
       e[i]=3.3;
   }
      if(b[i]>=78&&b[i]<=81){
       e[i]=3.0;
   }
      if(b[i]>=75&&b[i]<=77){
       e[i]=2.7;
   }
      if(b[i]>=72&&b[i]<=74){
       e[i]=2.3;
   }
      if(b[i]>=68&&b[i]<=71){
        e[i]=2.0;
   }
     if(b[i]>=64&&b[i]<=67){
         e[i]=1.5;
    }
      if(b[i]>=60&&b[i]<=63){
         e[i]=1.0;
     }
      if(b[i]<60){
        e[i]=0;
     }
     p=a[i];
    k+=(e[i]*p);
   }
   GPA=k/(m*1.0);
   printf("%.2f",GPA);
    return 0;
}
int main(){
	int n,i;
	int xf[10],cj[10];
	float a,b,jd[10],GPA;
	a=0;
	b=0;
	GPA=0;
	scanf("%d\n",&n);
	for(i=0;i<n;i++){
		scanf("%d",&xf[i]);
	}
    for(i=0;i<n;i++){
		scanf("%d",&cj[i]);
	}
	for(i=0;i<n;i++){
		if(cj[i]>=90){
			jd[i]=4.0f;
		}else if(cj[i]>=85){
			jd[i]=3.7f;
		}else if(cj[i]>=82){
			jd[i]=3.3f;
		}else if(cj[i]>=78){
			jd[i]=3.0f;
		}else if(cj[i]>=75){
			jd[i]=2.7f;
		}else if(cj[i]>=72){
			jd[i]=2.3f;
		}else if(cj[i]>=68){
			jd[i]=2.0f;
		}else if(cj[i]>=64){
			jd[i]=1.5f;
		}else{
			jd[i]=0.0f;
		}
	}
	for(i=0;i<n;i++){
		a+=xf[i];
	}
	for(i=0;i<n;i++){
		b+=jd[i]*xf[i];
	}
	GPA=b/a;
	printf("%.2f",GPA);
	return 0;
}
int main(){
	int i,sumpoint,n;
	scanf("%d\n",&n);
	int grade[N],point[N];
	double GPA,gradepoint[N],sum;
	sumpoint=0;
	sum=0;
	for(i=0;i<n;i++){
		if(i<n-1)
	    scanf("%d",&(point[i]));
		else{scanf("%d\n",&(point[i]));
        }
	}
	for(i=0;i<n;i++){
	    scanf("%d",&(grade[i]));}
	for(i=0;i<n;i++){
		if(grade[i]<=100&&grade[i]>=90)
		   gradepoint[i]=4.0;
		if(grade[i]<=89&&grade[i]>=85)
		   gradepoint[i]=3.7;
		if(grade[i]<=84&&grade[i]>=82)
		   gradepoint[i]=3.3;		
		if(grade[i]<=81&&grade[i]>=78)
		   gradepoint[i]=3.0;		
		if(grade[i]<=77&&grade[i]>=75)
		   gradepoint[i]=2.7;		
		if(grade[i]<=74&&grade[i]>=72)
		   gradepoint[i]=2.3;		
		if(grade[i]<=71&&grade[i]>=68)
		   gradepoint[i]=2.0;		
		if(grade[i]<=67&&grade[i]>=64)
		   gradepoint[i]=1.5;		
		if(grade[i]<=63&&grade[i]>=60)
		   gradepoint[i]=1.0;
	    if(grade[i]<60)
			gradepoint[i]=0;}
	for(i=0;i<n;i++){
	    sumpoint+=point[i];
	    sum+=gradepoint[i]*point[i];}
	GPA=sum/sumpoint;
	printf("%.2lf",GPA);
	return 0;
}
int main()
{
    int n,i,j,m;
    double a[10],b[10],c[10],d[10],h,g;
    float GPA;
    g=0;
    h=0;
    scanf("%d",&n);
    for(i=1;i<=n;i++)
    {
        scanf("%lf",&a[i]);
        g=g+a[i];
    }
    for(j=1;j<=n;j++)
    {
        scanf("%lf",&b[j]);
        if(b[j]<=100&&b[j]>=90)
        {
            c[j]=4.0;
        }
        else if(b[j]<=89&&b[j]>=85)
        {
            c[j]=3.7;
        }
        else if(b[j]<=84&&b[j]>=82)
        {
            c[j]=3.3;
        }
        else if(b[j]<=81&&b[j]>=78)
        {
            c[j]=3.0;
        }
        else if(b[j]<=77&&b[j]>=75)
        {
            c[j]=2.7;
        }
        else if(b[j]<=74&&b[j]>=72)
        {
            c[j]=2.3;
        }
        else if(b[j]<=71&&b[j]>=68)
        {
            c[j]=2.0;
        }
        else if(b[j]<=67&&b[j]>=64)
        {
            c[j]=1.5;
        }
        else if(b[j]<=63&&b[j]>=60)
        {
            c[j]=1.0;
        }
        else if(b[j]<=59)
        {
            c[j]=0;
        }
    }
    for(m=1;m<=n;m++)
    {
        d[m]=a[m]*c[m];
        h=h+d[m];
    }
    GPA=h/g;
    printf("%.2f",GPA);
    return 0;
}
int main()
{
	int a[num],b[num];
	double c[num],C=0,B=0,GPA;
	int n,i;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&b[i]);
		B+=b[i];
	}
	for(i=0;i<n;i++){
		scanf("%d",&a[i]);
		if(a[i]>=90){
			c[i]=4.0*b[i];
		}
		if(a[i]>=85&&a[i]<=89){
			c[i]=3.7*b[i];
		}
		if(a[i]>=82&&a[i]<=84){
			c[i]=3.3*b[i];
		}
		if(a[i]>=78&&a[i]<=81){
			c[i]=3.0*b[i];
		}
		if(a[i]>=75&&a[i]<=77){
			c[i]=2.7*b[i];
		}
		if(a[i]>=72&&a[i]<=74){
			c[i]=2.3*b[i];
		}
		if(a[i]>=68&&a[i]<=71){
			c[i]=2.0*b[i];
		}
		if(a[i]>=64&&a[i]<=67){
			c[i]=1.5*b[i];
		}
		if(a[i]>=60&&a[i]<=63){
			c[i]=1.0*b[i];
		}
		if(a[i]<60){
			c[i]=0*b[i];
		}
		C+=c[i];
	}
	GPA=C/B;
	printf("%.2lf",GPA);
	return 0;
}
void main()

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

z=y/x;
printf("%.2f",z);

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

	scanf("%d",&n);

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

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

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

	for(i=0;i<n;i++){
		zxf+=1.0*xf[i];
	}

	for(i=0;i<n;i++){
		zgd+=gd[i];
	}

	GPA=zgd/zxf;

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

	return 0;

}
int main(){
	int n,i;
	double sumjd=0,avejd;
	int k,sumxf=0;
	int xf[10];
	int fs[10];
	double jd[10];
    
	scanf("%d",&n);
    for(i=0;i<n;i++)
	{
	    scanf("%d",&(xf[i]));
	}
	 for(i=0;i<n;i++)
	{
	    scanf("%d",&(fs[i]));
	}

	 for(k=0;k<n;k++)
	 {
	     if(fs[k]>=90)
		 {
		 jd[k]=4.0;
		 }
	     else if(fs[k]>=85)
		 {
		 jd[k]=3.7;
		 }
	     else if(fs[k]>=85)
		 {
		 jd[k]=3.7;
		 }
		 else if(fs[k]>=82)
		 {
		 jd[k]=3.3;
		 }
		 else if(fs[k]>=78)
		 {
		 jd[k]=3.0;
		 }
		 else if(fs[k]>=75)
		 {
		 jd[k]=2.7;
		 }
		 else if(fs[k]>=72)
		 {
		 jd[k]=2.3;
		 }
		 else if(fs[k]>=68)
		 {
		 jd[k]=2.0;
		 }
		 else if(fs[k]>=64)
		 {
		 jd[k]=1.5;
		 }
		 else if(fs[k]>=60)
		 {
		 jd[k]=1.0;
		 }
	     else
		 {
		 jd[k]=0;
		 }
	 }
     
     for(i=0;i<n;i++)
	 {
	     sumjd=sumjd+1.0*xf[i]*jd[i];
	 }
	 for(i=0;i<n;i++)
	 {
	     sumxf=sumxf+xf[i];   
	 }
     avejd=1.0*sumjd/sumxf;
	 printf("%.2lf",avejd);
	 return 0;
}
int main()
{
	int sz[10],i,j,n,df[10];
	float gd;
    int sum1=0;
	float sum2=0;
	float GPA;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		
		scanf("%d",&sz[i]);
		
	}
    for(i=0;i<n;i++)
	{
		sum1+=sz[i];
		
	}
	for(i=0;i<n;i++)
	{
		scanf("%d",&df[i]);
	}
	for(i=0;i<n;i++)
	{
		if(df[i]>=90&&df[i]<=100)
		{
			gd=4.0;
		}
		if(df[i]>=85&&df[i]<=89)
		{
			gd=3.7;
		}
		if(df[i]>=82&&df[i]<=84)
		{
			gd=3.3;
		}
		if(df[i]>=78&&df[i]<=81)
		{
			gd=3.0;
		}
		if(df[i]>=75&&df[i]<=77)
		{
			gd=2.7;
		}
		if(df[i]>=72&&df[i]<=74)
		{
			gd=2.3;
		}
		if(df[i]>=68&&df[i]<=71)
		{
			gd=2.0;
		}
		if(df[i]>=64&&df[i]<=67)
		{
			gd=1.5;
		}
		if(df[i]>=60&&df[i]<=63)
		{
			gd=1.0;
		}
		if(df[i]<60)
		{
			gd=0;
		}
		sum2+=gd*sz[i];
	}
	GPA=sum2/sum1;
	printf("%.2f",GPA);
	return 0;
}
void main()
{
	int i,n,m=0,score;
	float sum=0,a[2][9],GPA;
	scanf("%d",&n);
	for(i=0;i<=n-1;i++)
		scanf("%f",&(a[0][i]));
	
	for(i=0;i<=n-1;i++)
	{
		scanf("%d",&score);
		if(score>=90)a[1][i]=4.0;
		else if(score>=85)a[1][i]=3.7;
		else if(score>=82)a[1][i]=3.3;
		else if(score>=78)a[1][i]=3.0;
		else if(score>=75)a[1][i]=2.7;
		else if(score>=72)a[1][i]=2.3;
		else if(score>=68)a[1][i]=2.0;
		else if(score>=64)a[1][i]=1.5;
		else if(score>=60)a[1][i]=1.0;
		else a[1][i]=0;
	}
	
	for(i=0;i<=n-1;i++)
	{
		sum=a[0][i]*a[1][i]+sum;
		m=m+a[0][i];
	}
	GPA=sum/m;
	printf("%.2f\n",GPA);	
}