semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main (){
    int i,k,xf[10],df[10];
    double GPA,result;
    double s=0;
    double num=0;
    scanf("%d",&k);
    for(i=0;i<=k-1;i++)
    scanf("%d",&xf[i]);
    for(i=0;i<=k-1;i++)
    scanf("%d",&df[i]);
    for(i=0;i<=k-1;i++){
        if(90<=df[i]&&df[i]<=100){
            result=4.0*xf[i];
        }
        if(85<=df[i]&&df[i]<=89){
            result=3.7*xf[i];
        }
        if(82<=df[i]&&df[i]<=84){
            result=3.3*xf[i];
        }
        if(78<=df[i]&&df[i]<=81){
            result=3.0*xf[i];
        }
        if(75<=df[i]&&df[i]<=77){
            result=2.7*xf[i];
        }
        if(72<=df[i]&&df[i]<=74){
            result=2.3*xf[i];
        }
        if(68<=df[i]&&df[i]<=71){
            result=2.0*xf[i];
        }
        if(64<=df[i]&&df[i]<=67){
            result=1.5*xf[i];
        }
        if(60<=df[i]&&df[i]<=63){
            result=1.0*xf[i];
        }
        if(df[i]<60){
            result=0;
        }
        num=num+result;
        s=xf[i]+s;
        }

        GPA=num/s;
        printf("%.2lf",GPA);
        return 0;
    }
int main()
   {
          
          int j,k,n,l,sum;float GPA,bb;
          int b[10]={0},a[10]={0}; float c[10]={0};
          
        
          scanf("%d",&n);
         
           for(j=0;j<n;j++)
           {
               scanf("%d",&b[j]);          }
               
                sum=0;
                for(l=0;l<n;l++){
               
               sum+=b[l];
               //printf("%d\n",sum);
               }
               
               
               
            for(k=0;k<n;k++){
               scanf("%d",&a[k]); 
               if(a[k]<60)
                   c[k]=0;
               else if(a[k]<=63)
               c[k]=1.0 ;
               else if(a[k]<=67)
               c[k]=1.5;
               else if(a[k]<=71)
               c[k]=2.0;
               else if(a[k]<=74)
               c[k]=2.3;
               else if(a[k]<=77)
               c[k]=2.7;
               else if(a[k]<=81)
                c[k]=3.0;
                else if(a[k]<=84)
                c[k]=3.3;
               else if(a[k]<=89)
               c[k]=3.7;
                else if(a[k]<=100)
               c[k]=4.0;
                 }  
             
               for(l=0;l<n;l++)
               bb=b[l]*c[l]+bb;
               
               //printf("%d\n",sum);
               //printf("%f\n",bb);
               
               GPA=bb/sum;
                  printf("%.2f",GPA); 
                  //scanf("%d",&n);     
              

              return 0;
          
          }
int main(){
	int n,i,o,p;
	int xuefen[1000];
	float defen[1000];
	float jidian[1000];
	float sum1=0,sum2=0,GPA;
        scanf("%d",&n);
		for(i=0;i<n-1;i++){
			scanf("%d ",&xuefen[i]);
			sum1=sum1+xuefen[i];
		}
		if(i=n-1){
			scanf("%d",&xuefen[i]);
			sum1=sum1+xuefen[i];
		}
        for(i=0;i<n-1;i++){
			scanf("%f ",&defen[i]);
			p=defen[i];
		 if((90<=p)&&(p<=100)){
				defen[i]=4.0;}
         if((85<=p)&&(p<=89)){
				defen[i]=3.7;} 
         if((82<=p)&&(p<=84)){
				defen[i]=3.3;}
		 if((78<=p)&&(p<=81)){
				defen[i]=3.0;}
		 if((75<=p)&&(p<=77)){
				defen[i]=2.7;}
		 if((72<=p)&&(p<=74)){
				defen[i]=2.3;}
		 if((68<=p)&&(p<=71)){
				defen[i]=2.0;}
		 if((64<=p)&&(p<=67)){
				defen[i]=1.5;}
		 if((60<=p)&&(p<=63)){
				defen[i]=1.0;}
		 if(p<60){
				defen[i]=0;}                                    
		}
		if(i=n-1){
			scanf("%f",&defen[i]);
			p=defen[i];
			if((90<=p)&&(p<=100)){
				defen[i]=4.0;}
         if((85<=p)&&(p<=89)){
				defen[i]=3.7;} 
         if((82<=p)&&(p<=84)){
				defen[i]=3.3;}
		 if((78<=p)&&(p<=81)){
				defen[i]=3.0;}
		 if((75<=p)&&(p<=77)){
				defen[i]=2.7;}
		 if((72<=p)&&(p<=74)){
				defen[i]=2.3;}
		 if((68<=p)&&(p<=71)){
				defen[i]=2.0;}
		 if((64<=p)&&(p<=67)){
				defen[i]=1.5;}
		 if((60<=p)&&(p<=63)){
				defen[i]=1.0;}
		 if(p<60){
				defen[i]=0;}     

		}
		for(i=0;i<n;i++){
			jidian[i]=xuefen[i]*defen[i];
			sum2=sum2+jidian[i];
		}
        GPA=sum2/sum1;
		printf("%.2f",GPA);
return 0;
}
int main()
{
    int n,i,grade;
    scanf("%d",&n);
    float credit[10],a=0,b=0,GPA;
    for(i=1;i<=n;i++)
    { 
                    scanf("%f",&credit[i]);
                    a+=credit[i];
    }
    for(i=1;i<=n;i++)
    {
    scanf("%d",&grade);
    if(90<=grade&&grade<=100)
    b+=credit[i]*4.0;
    else if(85<=grade&&grade<=89)
    b+=credit[i]*3.7;
    else if(82<=grade&&grade<=84)
    b+=credit[i]*3.3;
    else if(78<=grade&&grade<=81)
    b+=credit[i]*3.0;
    else if(75<=grade&&grade<=77)
    b+=credit[i]*2.7;
    else if(72<=grade&&grade<=74)
    b+=credit[i]*2.3;
    else if(68<=grade&&grade<=71)
    b+=credit[i]*2.0;
    else if(64<=grade&&grade<=67)
    b+=credit[i]*1.5;
    else if(60<=grade&&grade<=63)
    b+=credit[i]*1.0;
    else
    b+=credit[i]*0;
    }
    GPA=b/a;
    printf("%.2f",GPA);
}
int main()
{
	float sum1=0,c[11];
	int a[11],b[11],n,sum2=0,i;
cin>>n;
	for(i=1;i<=n;i++)
	{
	cin>>a[i];
sum2=sum2+a[i];
	
	}
for(i=1;i<=n;i++)
	{
	cin>>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;
}
sum1=sum1+c[i]*a[i];
	
	}
cout<<fixed;
cout.precision(2);
	cout<<sum1/sum2<<endl;
	
	return 0;
}
int main()
{
	int n;
	int sum1=0;
	int i,j,k;
	scanf("%d",&n);
	int a['n'],score['n'];
	float b['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",&(score[j]));
		if(((score[j])<=100)&&((score[j])>=90))
		{
			b[j]=4.0;
		}
		else if(((score[j])<=89)&&((score[j])>=85))
		{
			b[j]=3.7;
		}
		else if(((score[j])<=84)&&((score[j])>=82))
		{
			b[j]=3.3;
		}
		else if(((score[j])<=81)&&((score[j])>=78))
		{
			b[j]=3.0;
		}
		else if(((score[j])<=77)&&((score[j])>=75))
		{
			b[j]=2.7;
		}
		else if(((score[j])<=74)&&((score[j])>=72))
		{
			b[j]=2.3;
		}
		else if(((score[j])<=71)&&((score[j])>=68))
		{
			b[j]=2.0;
		}
		else if(((score[j])<=67)&&((score[j])>=64))
		{
			b[j]=1.5;
		}
		else if(((score[j])<=63)&&((score[j])>=60))
		{
			b[j]=1.0;
		}
		else
		{
			b[j]=0;
		}
	}
	for(k=0;k<n;k++)
	{
		sum2=sum2+(a[k])*(b[k]);
	}
	GPA=(float)sum2/sum1;
	printf("%.2f",GPA);


	return 0;
}
int main()
{
	int n,s[2][10];
	int i=0,k=0,sum1=0;
	double c,result;
	double sum2=0;
	scanf("%d",&n);
	for(i=0;i<2;i++)
	{
	for(k=0;k<n;k++)
	{
		scanf("%d",&s[i][k]);
	}
	}
	for(k=0;k<n;k++)
	{
		sum1+=s[0][k];
	}
    for(k=0;k<n;k++)
	{
		if(s[1][k]>=90&&s[1][k]<=100)
		{
			c=4.0;
		}
		else if(s[1][k]>=85&&s[1][k]<=89)
		{
			c=3.7;
		}
		else if(s[1][k]>=82&&s[1][k]<=84)
		{
			c=3.3;
		}
        else if(s[1][k]>=78&&s[1][k]<=81)
		{
			c=3.0;
		}

        else if(s[1][k]>=75&&s[1][k]<=77)
		{
			c=2.7;
		}

        else if(s[1][k]>=72&&s[1][k]<=74)
		{
			c=2.3;
		}

     	else if(s[1][k]>=68&&s[1][k]<=71)
		{
			c=2.0;
		}
        else if(s[1][k]>=64&&s[1][k]<=67)
		{
			c=1.5;
		}
		else if(s[1][k]>=60&&s[1][k]<=63)
		{
			c=1.0;
		}
		else if(s[1][k]<60)
		{
			c=0;
		}
		sum2+=c*s[0][k];
	}
	result=sum2/sum1;
	printf("%.2lf",result);
}
int main()
{
	int n,a[2][10],sum=0,i;
	double GPA=0,b[2][10];
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%d",&a[0][i]);
	}
	for(i=1;i<=n;i++)
	{
		scanf("%d",&a[1][i]);
	}
	for(i=1;i<=n;i++)
	{
        sum=sum+a[0][i];
	}
    for(i=1;i<=n;i++)
	{
		if(a[1][i]>=90) b[1][i]=4.0;
		if(a[1][i]>=85&&a[1][i]<90) b[1][i]=3.7;
		if(a[1][i]>=82&&a[1][i]<85) b[1][i]=3.3;
		if(a[1][i]>=78&&a[1][i]<82) b[1][i]=3.0;
		if(a[1][i]>=75&&a[1][i]<78) b[1][i]=2.7;
		if(a[1][i]>=72&&a[1][i]<75) b[1][i]=2.3;
		if(a[1][i]>=68&&a[1][i]<72) b[1][i]=2.0;
		if(a[1][i]>=64&&a[1][i]<68) b[1][i]=1.5;
		if(a[1][i]>=60&&a[1][i]<64) b[1][i]=1.0;
		if(a[1][i]<60) b[1][i]=0;
	}
	for(i=1;i<=n;i++)
	{
		GPA=GPA+b[1][i]*a[0][i];
	}
	GPA=GPA/sum;
	printf("%.2f",GPA);
}
int main(){
	int n,i,a,sum2;
	int xuefen[10];
	double GPA,sum1;
	double jidian[10];
	sum1=0;
	sum2=0;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&xuefen[i]);
	}
	for(i=0;i<n;i++){
		scanf("%d",&a);
		if(a>89&&a<101){
			jidian[i]=4.0;
		}else if(a>84&&a<90){
			jidian[i]=3.7;
		}else if(a>81&&a<85){
			jidian[i]=3.3;
		}else if(a>77&&a<82){
			jidian[i]=3.0;
		}else if(a>74&&a<78){
			jidian[i]=2.7;
		}else if(a>71&&a<75){
			jidian[i]=2.3;
		}else if(a>67&&a<72){
			jidian[i]=2.0;
		}else if(a>63&&a<68){
			jidian[i]=1.5;
		}else if(a>59&&a<64){
			jidian[i]=1.0;
		}else{
			jidian[i]=0.0;
		} 
	}
	
	for(i=0;i<n;i++){
		jidian[i]=jidian[i]*xuefen[i];
	}
	for(i=0;i<n;i++){
		sum1+=jidian[i];
		sum2+=xuefen[i];
	}
	GPA=sum1/sum2;
	printf("%.2f",GPA);
	return 0;
}
void main()
{
	int n,i,j,k,l;
	float GPA,m=0,p=0,a[3][9],b[9];
	scanf("%d\n",&n);
	for(i=0;i<=1;i++)
		for(j=0;j<=n-1;j++)
		{
			scanf("%f ",&a[i][j]);
	
		}
		for(j=0;j<=n-1;j++)
		{
			if(a[1][j]>=90)a[2][j]=4.0;
			else if(a[1][j]>=85)a[2][j]=3.7;
			else if(a[1][j]>=82)a[2][j]=3.3;
			else if(a[1][j]>=78)a[2][j]=3.0;
			else if(a[1][j]>=75)a[2][j]=2.7;
			else if(a[1][j]>=72)a[2][j]=2.3;
			else if(a[1][j]>=68)a[2][j]=2.0;
			else if(a[1][j]>=64)a[2][j]=1.5;
			else if(a[1][j]>=60)a[2][j]=1.0;
			else a[2][j]=0;
			
		}
		for(j=0;j<=n-1;j++)
		{
			b[j]=a[0][j]*a[2][j];
		m=m+b[j];
			p=p+a[0][j];
		}
		GPA=m/p;
		printf("%.2f\n",GPA);
}
int main()
{
	int n,i,sc,xuefen[10],S=0;
    float s=0,gpa,average;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&xuefen[i]);
		S=S+xuefen[i];
	}
	for(i=0;i<n;i++)
	{
		scanf("%d",&sc);
	
		    if(sc<=100&&sc>=90)
			gpa=4.0;
			else if(sc<=89&&sc>=85)
			gpa=3.7;
			else if(sc<=84&&sc>=82)
			gpa=3.3;
			else if(sc>=78&&sc<=81)
             gpa=3.0;
			else if(sc>=75&&sc<=77)
            gpa=2.7;
			else if(sc>=72&&sc<=74)
            gpa=2.3;
            else if(sc>=68&&sc<=71)
            gpa=2.0;
                else if(sc>=64&&sc<=67)
           gpa=1.5;
            else if(sc>=60&&sc<=63)
           gpa=1.0;
               else if(sc<60)
            gpa=0.0;
			   s=s+xuefen[i]*gpa;
	}
	average=s/S;
	printf("%.2f",average);
}
void main()
{
	int n,i,s=0;
	int a[10],b[10];
	float t=0;
	float c[10];
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%d",&a[i]);
		s=s+a[i];
	}
	for(i=1;i<=n;i++)
	{
		scanf("%d",&b[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;
		t+=c[i]*a[i];
	}
	printf("%.2f",t/s);
}
void main()
{
	int a[10],b[10],m=0,n,i;float c[10],GPA,sum=0.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&&b[i]<=100)c[i]=a[i]*4.0;
if(b[i]>=85&&b[i]<=89)c[i]=a[i]*3.7;
if(b[i]>=82&&b[i]<=84)c[i]=a[i]*3.3;
if(b[i]>=78&&b[i]<=81)c[i]=a[i]*3.0;	
if(b[i]>=75&&b[i]<=77)c[i]=a[i]*2.7;
if(b[i]>=72&&b[i]<=74)c[i]=a[i]*2.3;
if(b[i]>=68&&b[i]<=71)c[i]=a[i]*2.0;
if(b[i]>=64&&b[i]<=67)c[i]=a[i]*1.5;
if(b[i]>=60&&b[i]<=63)c[i]=a[i]*1.0;
if(b[i]<60)c[i]=0.0;
	}
for(i=0;i<n;i++)
{
	sum+=c[i];
m+=a[i];
}
GPA=sum/m;
printf("%.2f",GPA);
}
float GPA(int x);
int main()
{
	int i, n, cj[50], jd[50], jdsum=0;
	float sum = 0;
	scanf("%d", &n);

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

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

	//?????????
	for(i=0; i<n; i++)
	{
		sum += GPA(cj[i]) * jd[i];
		jdsum += jd[i];
	}

	//????
	printf("%.2f", sum/jdsum);

	return 0;
}

float GPA(int x)
{
	if(x >= 90 && x <= 100) return 4.0;
	else if(x >= 85 && x <= 89) return 3.7;
	else if(x >= 82 && x <= 84) return 3.3;
	else if(x >= 78 && x <= 81) return 3.0;
	else if(x >= 75 && x <= 77) return 2.7;
	else if(x >= 72 && x <= 74) return 2.3;
	else if(x >= 68 && x <= 71) return 2.0;
	else if(x >= 64 && x <= 67) return 1.5;
	else if(x >= 60 && x <= 63) return 1.0;
	else return 0;
}
int main()
{
	int n,z[10];
	float s[10],u[10],a=0.0,b,c=0.0;
	float GPA;
    int i=0;
	scanf("%d",&n);
	while(i<n){
		scanf("%d",&(z[i]));
		c=c+z[i];
		i++;
	}
	
	i=0;
    while(i<n){
		scanf("%f",&(s[i]));
		i++;
	}
	i=0;
	while(i<n){
		if(s[i]>=90&&s[i]<=100){
			b=4.0;
		}
		if(s[i]>=85&&s[i]<=89){
			b=3.7;
		}
	    if(s[i]>=82&&s[i]<=84){
			b=3.3;
		}
     	if(s[i]>=78&&s[i]<=81){
			b=3.0;
		}
    	if(s[i]>=75&&s[i]<=77){
			b=2.7;
		}
	    if(s[i]>=72&&s[i]<=74){
			b=2.3;
		}
	    if(s[i]>=68&&s[i]<=71){
			b=2.0;
		}
	    if(s[i]>=64&&s[i]<=67){
			b=1.5;
		}
    	if(s[i]>=60&&s[i]<=63){
			b=1.0;
		}
	    if(s[i]<60){
			b=0.0;
		}
	    u[i]=b*z[i];
	    a=a+u[i];
	    i++;
	}
	GPA=a/c;
	printf("%.2f",GPA);
	//scanf("%d",&n);
	return 0;
}
int main(){
    int n,u[100],v[100];
    float a[100],b[100],t,s,r;
    scanf("%d",&n);
	t=0.0;
    s=0.0;
    for(int i=0;i<=(n-1);i++){
            scanf("%d ",&u[i]);
            s=s+u[i]*(1.0);
            }
    for(int i=0;i<=(n-1);i++){
            scanf("%d ",&v[i]);
			}
    for(int i=0;i<=(n-1);i++){
		if((v[i]>=90)&&(v[i]<=100)){
                                    a[i]=4.0;}    
                                    else if((v[i]<=89)&&(v[i]>=85)){
                                         a[i]=3.7;}
                                         else if((v[i]<=84)&&(v[i]>=82)){
                                         a[i]=3.3;}
                                         else if((v[i]<=81)&&(v[i]>=78)){
                                         a[i]=3.0;}
                                         else if((v[i]<=77)&&(v[i]>=75)){
                                         a[i]=2.7;}
                                         else if((v[i]<=74)&&(v[i]>=72)){
                                         a[i]=2.3;}
                                         else if((v[i]<=71)&&(v[i]>=68)){
                                         a[i]=2.0;}
                                         else if((v[i]<=67)&&(v[i]>=64)){
                                         a[i]=1.5;}
                                         else if((v[i]<=63)&&(v[i]>=60)){
                                         a[i]=1.0;}
                                         else if((v[i]<60)){
                                         a[i]=0.0;}
										}
    for(int i=0;i<=(n-1);i++){
            b[i]=u[i]*1.0*a[i];
            t=t+b[i];
            }
            r=t/s;
    printf("%.2f",r);
	return 0;
    }
int main()
{
	int num=0, sco[10]={0}, gra[10]={0}, i, totalsco=0;
	float gpa=0.0, totalgpa=0.0, jd[10]={0.0};
	scanf("%d", &num);
	getchar();
	for(i=0;i<num;i++)
	{
		scanf("%d", &sco[i]);
	}
	getchar();
	for(i=0;i<num;i++)
	{
		scanf("%d", &gra[i]);
	}
	for(i=0;i<num;i++)
	{
		if(gra[i]>=90 && gra[i]<=100) jd[i]=4.0;
		if(gra[i]>=85 && gra[i]<=89) jd[i]=3.7;
		if(gra[i]>=82 && gra[i]<=84) jd[i]=3.3;
		if(gra[i]>=78 && gra[i]<=81) jd[i]=3.0;
		if(gra[i]>=75 && gra[i]<=77) jd[i]=2.7;
		if(gra[i]>=72 && gra[i]<=74) jd[i]=2.3;
		if(gra[i]>=68 && gra[i]<=71) jd[i]=2.0;
		if(gra[i]>=64 && gra[i]<=67) jd[i]=1.5;
		if(gra[i]>=60 && gra[i]<=63) jd[i]=1.0;
		if(gra[i]<60) jd[i]=0;
		totalsco+=sco[i];
		totalgpa+=jd[i]*sco[i];
	}
	gpa=totalgpa/totalsco;
	printf("%.2f\n", gpa);
	return 0;
}
int main()
{
	int n,i;
	int u[200];
	int r[200];
	float s[200];
	float k,w,p;
	scanf("%d",&n);
	for(i=1;i<=n;i++){
		scanf("%d",&r[i]);
	}
	for(i=1;i<=n;i++){
		scanf("%d ",&u[i]);
	}
	for(i=1;i<=n;i++){
		if(u[i]>=90){
			s[i]=4.0;
		}else{
			if(u[i]>=85){
				s[i]=3.7;
			}else{
				if(u[i]>=82){
					s[i]=3.3;
				}else{
					if(u[i]>=78){
						s[i]=3.0;
					}else{
						if(u[i]>=75){
							s[i]=2.7;
						}else{
							if(u[i]>=72){
								s[i]=2.3;
							}else{
								if(u[i]>=68){
									s[i]=2.0;
								}else{
									if(u[i]>=64){
										s[i]=1.5;
									}else{
										if(u[i]>=60){
											s[i]=1.0;
										}else{
											s[i]=0;
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	k=0;
	p=0;
		for(i=1;i<=n;i++){
			k=k+s[i]*r[i];
			p=p+r[i];
		}
		w=k/p;
		printf("%.2f",w);
		return 0;
	}
int main(){
	int n,i;
	float x[100];
    float y[100];
    float z[100];
	float m[100];
    float GPA;
	float a=0;
	float b=0;
    scanf("%d",&n);
    for(i=0;i<n;i++){
		scanf("%f",&y[i]);
	}
	for(i=0;i<n;i++){
		scanf("%f",&x[i]);
		if(x[i]<=100&&x[i]>=90){
			m[i]=4.0;
		}
        if(x[i]<=89&&x[i]>=85){
			m[i]=3.7;
		}
        if(x[i]<=84&&x[i]>=82){
			m[i]=3.3;
		}
        if(x[i]<=81&&x[i]>=78){
			m[i]=3.0;
		}
        if(x[i]<=77&&x[i]>=75){
			m[i]=2.7;
		}
        if(x[i]<=74&&x[i]>=72){
			m[i]=2.3;
		}

		if(x[i]<=71&&x[i]>=68){
			m[i]=2.0;
		}

 	    if(x[i]<=67&&x[i]>=64){
			m[i]=1.5;
		}
        if(x[i]<=63&&x[i]>=60){
			m[i]=1.0;
		}
        if(x[i]<60){
			m[i]=0.0;
		}
	}

	for(i=0;i<n;i++){
        z[i]=y[i]*m[i];
        a=a+z[i];
		b=b+y[i];
	}
	GPA=a/b;
    printf("%.2f",GPA);

	return 0;
}
int main()
{
	int n,i;
	float gpa,score[10]={0},g[10]={0},pow[10]={0},sg,ave,s;
	s=0;ave=0;sg=0;
	scanf("%d",&n);
	for (i=0;i<n;i++)
	{
		scanf("%f",&pow[i]);
		s=s+pow[i];
	}
	for (i=0;i<n;i++)
	{
		scanf("%f",&score[i]);
		if(score[i]<=100.0&&score[i]>=90.0)
			g[i]=4.0;
		else if(score[i]<=89.0&&score[i]>=85.0)
			g[i]=3.7;
		else if(score[i]<=84.0&&score[i]>=82.0)
			g[i]=3.3;
		else if(score[i]<=81.0&&score[i]>=78.0)
			g[i]=3.0;
		else if(score[i]<=77.0&&score[i]>=75.0)
			g[i]=2.7;
		else if(score[i]<=74.0&&score[i]>=72.0)
			g[i]=2.3;
		else if(score[i]<=71.0&&score[i]>=68.0)
			g[i]=2.0;
		else if(score[i]<=67.0&&score[i]>=64.0)
			g[i]=1.5;
		else if(score[i]<=63.0&&score[i]>=60.0)
			g[i]=1.0;
		else g[i]=0;
		sg=sg+g[i]*pow[i];
	}
	gpa=sg/s;
	printf("\n%.2f",gpa);
	return 0;
}
void main()
{
	int a[11],b[11];
	int g=0,i,n;
	float GPA,c[11],f=0,d[11];
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d",&a[i]);
	for(i=0;i<n;i++)
		scanf("%d",&b[i]);
	for(i=0;i<n;i++)
	{
		if(b[i]>=90)
			c[i]=4.0;
		else if(b[i]>=85)
			c[i]=3.7;
		else if(b[i]>=82)
			c[i]=3.3;
		else if(b[i]>=78)
			c[i]=3.0;
		else if(b[i]>=75)
			c[i]=2.7;
		else if(b[i]>=72)
			c[i]=2.3;
		else if(b[i]>=68)
			c[i]=2.0;
		else if(b[i]>=64)
			c[i]=1.5;
		else if(b[i]>=60)
			c[i]=1.0;
		else
			c[i]=0;
	}
	for(i=0;i<n;i++)
	{
		d[i]=c[i]*a[i];
		f=f+d[i];
		g=g+a[i];
	}
	GPA=(float)f/g;
	printf("%.2f\n",GPA);
}
int main()
{
	int i,n,zongxuefen=0;
	int chengji[10];
	int xuefen[10];
	double zongpingjidian=0,jidian[10],zongjidian=0;
	scanf("%d",&n);
	for(i=1;i<=n;i++){
      scanf("%d",&xuefen[i]);
	}
    for(i=1;i<=n;i++){
		scanf("%d",&chengji[i]);
	}
	
	for(i=1;i<=n;i++){
		if((chengji[i]>=90)&&(chengji[i]<=100)){
		jidian[i]=4.0;}
	if((chengji[i]>=85)&&(chengji[i]<=89)){
		jidian[i]=3.7;}
	if((chengji[i]>=82)&&(chengji[i]<=84)){
		jidian[i]=3.3;}
    if((chengji[i]>=78)&&(chengji[i]<=81)){
		jidian[i]=3.0;}
	if((chengji[i]>=75)&&(chengji[i]<=77)){
		jidian[i]=2.7;}
	if((chengji[i]>=72)&&(chengji[i]<=74)){
		jidian[i]=2.3;}
	if((chengji[i]>=68)&&(chengji[i]<=71)){
		jidian[i]=2.0;}
	if((chengji[i]>=64)&&(chengji[i]<=67)){
		jidian[i]=1.5;}
	if((chengji[i]>=60)&&(chengji[i]<=63)){
		jidian[i]=1.0;}
	if(chengji[i]<=60){
		jidian[i]=0;}
    zongjidian+=1.0*xuefen[i]*jidian[i];
			zongxuefen+=xuefen[i];
		}
    zongpingjidian=1.0*zongjidian/zongxuefen;
	printf("%.2lf",zongpingjidian);
return 0;


}
void main()
{
int i,n;
float b[10],y,s,a[10],x,GPA;
scanf("%d",&n);
y=0;
for(i=0;i<n;i++)
{scanf("%f",&b[i]);
 y=y+b[i];}
s=0;
for(i=0;i<n;i++)
{scanf("%f",&x);
if(x>=90&&x<=100)
   a[i]=4.0;
else if(x>=85&&x<=89)
   a[i]=3.7;
else if(x>=82&&x<=84)
   a[i]=3.3;
else if(x>=78&&x<=81)
   a[i]=3.0;
else if(x>=75&&x<=77)
   a[i]=2.7;
else if(x>=72&&x<=74)
   a[i]=2.3;
else if(x>=68&&x<=71)
   a[i]=2.0;
else if(x>=64&&x<=67)
   a[i]=1.5;
else if(x>=60&&x<=63)
   a[i]=1.0;
else if(x<=60)
   a[i]=0;
s=s+a[i]*b[i];
}
GPA=s/y;
printf("%.2lf",GPA);
}
int main ()
{
 int n,i=0,a[N],b[N],x=0;
 float c[N],y=0.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++)
 {
  if(b[i]>=90&&b[i]<=100) c[i]=4.0;
  else 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]<=83) 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]<=73) c[i]=2.3;
  else if(b[i]>=68&&b[i]<=71) c[i]=2.0;
  else if(b[i]>=64&&b[i]<=67) c[i]=1.5;
  else if(b[i]>=60&&b[i]<=63) c[i]=1.0;
  else if(b[i]<=59) c[i]=0.0;
 }
 for(i=0;i<n;i++)
 {
	 y=y+a[i]*c[i];
	 x=x+a[i];
 }
 z=y/x;
 printf("%.2f",z);
}
void main()
{
	int n,a[10],b[10],i,j,e=0;
	float sum=0,GPA;
	scanf("%d\n",&n);
	for(i=1;i<=n;i++)
	scanf("%d\n",&a[i]);
	for(j=1;j<=n;j++)
		scanf("%d\n",&b[j]);
	for(j=1;j<=n;j++)
	{
		if(b[j]>=90)
			sum=sum+a[j]*4.0;
		else if(b[j]<=89&&b[j]>=85)
			sum=sum+a[j]*3.7;
		else if(b[j]<=84&&b[j]>=82)
			sum=sum+a[j]*3.3;
		else if(b[j]<=81&&b[j]>=78)
			sum=sum+a[j]*3.0;
		else if(b[j]<=77&&b[j]>=75)
			sum=sum+a[j]*2.7;
		else if(b[j]<=74&&b[j]>=72)
			sum=sum+a[j]*2.3;
		else if(b[j]<=71&&b[j]>=68)
			sum=sum+a[j]*2.0;
		else if(b[j]<=67&&b[j]>=64)
			sum=sum+a[j]*1.5;
		else if(b[j]<=63&&b[j]>=60)
			sum=sum+a[j]*1.0;
		else
			sum=sum+a[j]*0;
	}
		for(i=1;i<=n;i++)
			e=e+a[i];
		GPA=sum/e;
		printf("%.2f\n",GPA);
		
}
void main()
{
    int n,a[10],b[10],i,m=0;
	float g,s=0,t[10],gpa;
	scanf("%d",&n);
	for(i=0;i<=n-1;i++)
	{ scanf("%d",&b[i]);}
	for(i=0;i<=n-1;i++){
	   scanf("%d",&a[i]);
	   if(a[i]>=90) g=4.0;
      else if(a[i]>=85) g=3.7;
	  else if(a[i]>=82) g=3.3;
	  else if(a[i]>=78) g=3.0;
	  else if(a[i]>=75) g=2.7;
	  else if(a[i]>=72) g=2.3;
	  else if(a[i]>=68) g=2.0;
	  else if(a[i]>=64) g=1.5;
	  else if(a[i]>=60) g=1.0;
	  else g=0;
	  t[i]=g;
	  s=s+b[i]*t[i];
    m=m+b[i];
	
	}

    gpa=s/m;
	printf("%.2f",gpa);


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