semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
void main()
{
   int n=0,xuefen[10]={0},defen[10]={0},i=0;
   float num=0,fen=0,GPA=0,gpa[10]={0};
   scanf("%d",&n);
   for(i=0;i<n;i++) scanf("%d",&xuefen[i]);
   for(i=0;i<n;i++) scanf("%d",&defen[i]);
   for(i=0;i<n;i++)
   {
      if(defen[i]>89) gpa[i]=4;
      else if(defen[i]>84&&defen[i]<90) gpa[i]=3.7;
      else if(defen[i]>81&&defen[i]<85) gpa[i]=3.3;
      else if(defen[i]>77&&defen[i]<82) gpa[i]=3;
      else if(defen[i]>74&&defen[i]<78) gpa[i]=2.7;
      else if(defen[i]>71&&defen[i]<75) gpa[i]=2.3;
      else if(defen[i]>67&&defen[i]<72) gpa[i]=2;
      else if(defen[i]>63&&defen[i]<68) gpa[i]=1.5;
      else if(defen[i]>59&&defen[i]<64) gpa[i]=1;
      else if(defen[i]<60) gpa[i]=0;
   }
   for(i=0;i<n;i++)
   {
      num=num+gpa[i]*xuefen[i];
      fen=fen+xuefen[i];
   }
   GPA=num/fen;
   printf("%.2f\n",GPA);
}
/*?????????????????????GPA?????????????????????????????????*/



float gradetogpa(int grade)//?????
{
	float gpa;
	if(grade<=100 && grade>=90) gpa=4.0;
	if(grade<=89 && grade>=85) gpa=3.7;
	if(grade<=84 && grade>=82) gpa=3.3;
	if(grade<=81 && grade>=78) gpa=3.0;
	if(grade<=77 && grade>=75) gpa=2.7;
	if(grade<=74 && grade>=72) gpa=2.3;
	if(grade<=71 && grade>=68) gpa=2.0;
	if(grade<=67 && grade>=64) gpa=1.5;
	if(grade<=63 && grade>=60) gpa=1.0;
	if(grade<60) gpa=0.0;
	return gpa;
}
int main()
{
	float GPA,sumgpa=0;
	int n,i,a[11],b[11],sum=0;
	cin>>n;
	for(i=1;i<=n;i++)//????????
	{
		cin>>a[i];
		sum=sum+a[i];
	}
	for(i=1;i<=n;i++) //????????
	{
		cin>>b[i];
		sumgpa=sumgpa+gradetogpa(b[i])*a[i];
	}
	GPA=sumgpa/sum;
	printf("%.2f\n",GPA);
	return 0;
}
int main(){
    int n,i;
    int m=0;
    double s=0;
    double x;
    scanf("%d",&n);
    int sz[n],sx[n];
    double sy[n];
    for(i=0;i<n;i++){
        scanf("%d",&(sz[i]));}
    for(i=0;i<n;i++){    
        scanf("%d",&(sx[i]));
    }
    if(n<10){for(i=0;i<n;i++){ 
        m=m+sz[i];
        if(90<=sx[i]&&sx[i]<= 100){
           sy[i]=4.0;
        }else if(85<=sx[i]&&sx[i]<= 89){
            sy[i]=3.7;
        }else if(82<=sx[i]&&sx[i]<=84){
           sy[i]=3.3;
        }else if(78<=sx[i]&&sx[i]<= 81){
            sy[i]=3.0;
        }else if(75<=sx[i]&&sx[i]<=77){
            sy[i]=2.7;
        }else if(72<=sx[i]&&sx[i]<=74){
            sy[i]=2.3;
        }else if(68<=sx[i]&&sx[i]<=71){
            sy[i]=2.0;
        }else if(64<=sx[i]&&sx[i]<=67){
            sy[i]=1.5;
        }else if(60<=sx[i]&&sx[i]<=63){
            sy[i]=1.0;
        }else{
            sy[i]=0;
        }
        s=s+sy[i]*sz[i];
    }
    }
    x=s/m;
  
    printf("%.2lf",x);
    return 0;
}
int main()
{
	int score[10],i,n;
	double a[10],sum=0,SUM=0,GPA,t=0,p;
	scanf("%d\n",&n);
	for(i=0;i<n;i++){
		scanf("%lf",&a[i]);
		SUM+=a[i];
	}
	for(i=0;i<n;i++){
	scanf("%d",&score[i]);
	if(90<=score[i])
		p=4.0;
	else if(85<=score[i])
		p=3.7;
	else if(82<=score[i])
	    p=3.3;
	else if(78<=score[i])
	    p=3.0;
	else if(75<=score[i])
	    p=2.7;
    else if(72<=score[i])
	    p=2.3;
	else if(68<=score[i])
	    p=2.0;
	else if(64<=score[i])
	    p=1.5;
	else if(60<=score[i])
	    p=1.0;
		else
		p=0;
	t=p*a[i];
	sum+=t;
	}
	GPA=(double)sum/SUM;
	printf("%.2lf",GPA);
	return 0;
}
double jp(int p)
{
	double jp;
	if(p>=90)
		jp=4.0;
	else if(p>=85)
		jp=3.7;
	else if(p>=82)
		jp=3.3;
	else if(p>=78)
		jp=3.0;
	else if(p>=75)
		jp=2.7;
	else if(p>=72)
		jp=2.3;
	else if(p>=68)
		jp=2.0;
	else if(p>=64)
		jp=1.5;
	else if(p>=60)
		jp=1.0;
	else
		jp=0.0;
	return jp;
}
int main()
{
	int n,p;
	scanf("%d",&n);
	int list1[10];
	double list2[10];
	int i;

	for(i=0;i<n;i++)
		scanf("%d",&list1[i]);
	for(i=0;i<n;i++)
	{
		scanf("%d",&p);
		list2[i]=jp(p)*list1[i];
	}

	int sum1=0;
	double sum2;
	for(i=0;i<n;i++)
         sum1+=list1[i];
	for(i=0;i<n;i++)
		sum2+=(list2[i]/sum1);

	printf("%.2f",sum2);
	return 0;
}
void main()
{
	int f[10]={0};
	double GPA,g[10]={0};
	int t,i,n;
	scanf("%d",&n);
	for (i=0;i<n;i++)
	{
		scanf("%d",&f[i]);
	}
	for (i=0;i<n;i++)
	{
		scanf("%lf",&g[i]);
	}
	for (i=0;i<n;i++)
	{
		if (g[i]>=90 && g[i]<=100) g[i]=4;
		else if (g[i]>=85 && g[i]<=89) g[i]=3.7;
		else if (g[i]>=82 && g[i]<=84) g[i]=3.3;
		else if (g[i]>=78 && g[i]<=81) g[i]=3.0;
		else if (g[i]>=75 && g[i]<=77) g[i]=2.7;
		else if (g[i]>=72 && g[i]<=74) g[i]=2.3;
		else if (g[i]>=68 && g[i]<=71) g[i]=2.0;
		else if (g[i]>=64 && g[i]<=67) g[i]=1.5;
		else if (g[i]>=60 && g[i]<=63) g[i]=1.0;
		else g[i]=0;
	}
	for (GPA=0,t=0,i=0;i<n;i++)
	{
		GPA=GPA+f[i]*g[i];
		t=t+f[i];
	}
	GPA=GPA/t;
	printf("%.2f\n",GPA);
}
int main(int argc, char* argv[])
{
	int n,defen[10],xuefen[10],sumxuefen=0,a,i;
	float zhi,jidian[10],b,sumjidian=0;
	scanf("%d",&n);
	for (i=0;i<n;i++)
	{
		scanf("%d",&xuefen[i]);
		sumxuefen=sumxuefen+xuefen[i];
	}
	for(i=0;i<n;i++)
	{
		scanf("%d",&defen[i]);
		a=defen[i];
		if(a>=90)
			b=4.0;
		if(a>=85&&a<=89)
			b=3.7;
		if(a>=82&&a<=84)
			b=3.3;
		if(a>=78&&a<=81)
			b=3.0;
		if(a>=75&&a<=77)
			b=2.7;
		if(a>=72&&a<=74)
			b=2.3;
		if(a>=68&&a<=71)
			b=2.0;
		if(a>=64&&a<=67)
			b=1.5;
		if(a>=60&&a<=63)
			b=1.0;
		if(a<60)
			b=0.0;
		jidian[i]=b;
		sumjidian=sumjidian+xuefen[i]*jidian[i];
	}
	zhi=sumjidian/sumxuefen;
	printf("%.2f",zhi);
	return 0;
}
void main()
{
   int i,n,xft=0;
   int xf[10],score[10];
   float GPA=0,jd[10];
   scanf("%d",&n);
   for(i=0;i<=n-1;i++)
   {
	   scanf("%d",&xf[i]);
	   xft=xft+xf[i];
   }
   for(i=0;i<=n-1;i++)
   {
	   scanf("%d",&score[i]);
	   if(score[i]>=90) jd[i]=4.0;
	   else if(score[i]>=85) jd[i]=3.7;
	   else if(score[i]>=82) jd[i]=3.3;
	   else if(score[i]>=78) jd[i]=3.0;
	   else if(score[i]>=75) jd[i]=2.7;
	   else if(score[i]>=72) jd[i]=2.3;
	   else if(score[i]>=68) jd[i]=2.0;
	   else if(score[i]>=64) jd[i]=1.5;
	   else if(score[i]>=60) jd[i]=1.0;
	   else if(score[i]>=0) jd[i]=0;
   }
   for(i=0;i<=n-1;i++)
   {
	   GPA=GPA+xf[i]*jd[i];
   }
   GPA=GPA/xft;
   printf("%.2f",GPA);
}
void main()
{
	int n,i,k=0;
    scanf("%d",&n);
    int a[n],b[n];
	double m,s=0.0,GPA;
    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)
			m=4.0;
		else if(b[i]>=85)
			m=3.7;
			else if(b[i]>=82)
			        m=3.3;
				else if(b[i]>=78)
		            	m=3.0;
					else if(b[i]>=75)
		             	m=2.7;
						else if(b[i]>=72)
		                	m=2.3;
							else if(b[i]>=68)
			                     m=2.0;
								else if(b[i]>=64)
			                         m=1.5;
									else if(b[i]>=60)
		                                	m=1.0;
										else m=0.0;
		s=s+a[i]*m;
		k=k+a[i];
	}
	GPA=s/k;
	printf("%.2f",GPA);
}
void main()
{
	int a[2][10],sub,i,j;
	float GPA,g[10],subjd[10],sumxf=0,sumjd=0;
	scanf("%d",&sub);
	for(i=0;i<2;i++)
	{
		for(j=0;j<sub;j++)
		scanf("%d ",&a[i][j]);
	}
	for(j=0;j<sub;j++)
	{
		if(a[1][j]<=100&&a[1][j]>=90)
			g[j]=4.0;
		else if (a[1][j]>=85)
			g[j]=3.7;
		else if (a[1][j]>=82)
			g[j]=3.3;
		else if (a[1][j]>=78)
			g[j]=3.0;
		else if (a[1][j]>=75)
			g[j]=2.7;
		else if (a[1][j]>=72)
			g[j]=2.3;
		else if (a[1][j]>=68)
			g[j]=2.0;
		else if (a[1][j]>=64)
			g[j]=1.5;
		else if (a[1][j]>=60)
			g[j]=1.0;
		else if(a[1][j]<60)
			g[j]=0;
	}
	for(j=0;j<sub;j++)
	{
		subjd[j]=g[j]*a[0][j];
		sumxf=sumxf+a[0][j];
		sumjd=sumjd+subjd[j];
	}
	GPA=sumjd/sumxf;
	printf("%.2f",GPA);
}
int main()
{
	int shang[10] = {100,89,84,81,77,74,71,67,63,59};
	int xia[10] = {90,85,82,78,75,72,68,64,60,0};
	double jidian[10] = {4.0,3.7,3.3,3.0,2.7,2.3,2.0,1.5,1.0,0};
	int n;
	cin>>n;
	int xuefen[n];
	double fenshu[n];
	int sumxuefen = 0;
	for(int i = 0; i < n; i++)
	{
		cin>>xuefen[i];
		sumxuefen += xuefen[i];
	}
	for(int i = 0; i < n; i++)
		cin>>fenshu[i];
	double sum = 0;	
	for(int i = 0; i < n; i++)
	{
		for(int j = 0; j < 10; j++)
			if(fenshu[i] >= xia[j] && fenshu[i] <= shang[j])
			{
				fenshu[i] = jidian[j]*xuefen[i];
				sum += fenshu[i];
			}
	}
	
	double result = sum / sumxuefen;
	printf("%.2f",result);
	
	return 0;
}
main ()
{
     int n,i,zongxf;
     cin>>n;
     int xf[n],df[n];
     double gpa,s,jd[n];
     for(i=0;i<n;i++) cin>>xf[i];
     for(i=0;i<n;i++) cin>>df[i];
     for(i=0;i<n;i++) 
     {
                      if(df[i]>=90 && df[i]<=100) jd[i]=4.0;
                      else if(df[i]>=85 && df[i]<=89) jd[i]=3.7;
                      else if(df[i]>=82 && df[i]<=84) jd[i]=3.3;
                      else if(df[i]>=78 && df[i]<=81) jd[i]=3.0;
                      else if(df[i]>=75 && df[i]<=77) jd[i]=2.7;
                      else if(df[i]>=72 && df[i]<=74) jd[i]=2.3;
                      else if(df[i]>=68 && df[i]<=71) jd[i]=2.0;
                      else if(df[i]>=64 && df[i]<=67) jd[i]=1.5;
                      else if(df[i]>=60 && df[i]<=63) jd[i]=1.0;
                      else jd[i]=0;
      } 
      
     s=0;
     zongxf=0;
      for(i=0;i<n;i++) 
      {
            s=s+jd[i]*xf[i];
            zongxf=zongxf+xf[i];
            
      }
     gpa=s/zongxf;
     printf("%.2f",gpa);
     return 0;
}
double f(int n)
{
       if(n<=100 && n>=90)
           return 4.0;
       if(n<=89 && n>=85)
       return 3.7;
       if(n<=84 && n>=82)
       return 3.3;
       if(n<=81 && n>=78)
       return 3.0;
       if(n<=77 && n>=75)
       return 2.7;
       if(n<=74 && n>=72)
       return 2.3;
       if(n<=71 && n>=68)
       return 2.0;
       if(n<=67 && n>=64)
       return 1.5;
       if(n<=63 && n>=60)
       return 1.0;
       if(n<60)
       return 0;
       }
int main()
{
    int cred[11],score[11],n;
    cin>>n;
      double ans=0;
    for(int i=0;i<n;i++)
    {
        cin>>cred[i];
        ans+=cred[i];
        }
    double sc=0;
    for(int i=0;i<n;i++)
    {    
        cin>>score[i];
        sc+=f(score[i])*cred[i];
        }
    ans = sc/ans;
    cout.precision(3);
    cout<<ans<<endl;
}
int main()
{
    int i,n,s[10],grade[10],Sum;
    float p[10],sum,GPA;
    scanf("%d",&n);
    printf("\n");
    sum=0;
    Sum=0;
    for (i=1; i<=n; i++) {
        scanf("%d",&s[i]);
    }
    for (i=1; i<=n; i++) {
        scanf("%d",&grade[i]);
    }
    for (i=1; i<=n; i++) {
        if (grade[i]>=90&&grade[i]<=100) {
            p[i]=4.0;
        }
        else if(grade[i]>=85){
            p[i]=3.7;
        }
        else if(grade[i]>=82){
            p[i]=3.3;
        }
        else if(grade[i]>=78){
            p[i]=3.0;
        }
        else if(grade[i]>=75){
            p[i]=2.7;
        }
        else if(grade[i]>=72){
            p[i]=2.3;
        }
        else if(grade[i]>=68){
            p[i]=2.0;
        }
        else if(grade[i]>=64){
            p[i]=1.5;
        }
        else if(grade[i]>=60){
            p[i]=1.0;
        }
        else p[i]=0;        
        sum=sum+p[i]*s[i];
        Sum=Sum+s[i];
    }
    GPA=sum/Sum;
    printf("%.2f",GPA);
    return 0;
}
int main(){
    int n,i,a[10],b[10],q=0;
	double m=0,p,c[10];
    scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&a[i]);
		q=q+a[i];
	}
	for(i=0;i<n;i++){
		scanf("%d",&b[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 if(b[i]<60){
			c[i]=0;
		}
		m=m+1.000000*a[i]*c[i];
	}
	p=m/q;
	printf("%.2lf",p);
    return 0;
}
void main()
{
	int n,a[11],c[11],i,j,k=0;
	float b[11],GPA,m=0;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%d",&a[i]);
		k=k+a[i];
	}
	for(j=1;j<=n;j++)
	{
		scanf("%d",&c[j]);
		if(c[j]>=90)
			b[j]=4.0;
		else
			if(c[j]>=85)
				b[j]=3.7;
			else
				if(c[j]>=82)
					b[j]=3.3;
				else
					if(c[j]>=78)
						b[j]=3.0;
					else
						if(c[j]>=75)
							b[j]=2.7;
						else
							if(c[j]>=72)
								b[j]=2.3;
							else
								if(c[j]>=68)
									b[j]=2.0;
								else
									if(c[j]>=64)
										b[j]=1.5;
									else
										if(c[j]>=60)
											b[j]=1.0;
										else
											b[j]=0;
										m=m+b[j]*a[j];
	}
	GPA=(float)m/k;
	printf("%.2lf",GPA);
}
int main()
{
   int n,i,x;
   float a[100],jd,sumx,sumj;
   int b[20];
   for (i=0;i<=59;i++) a[i]=0;
   for (i=60;i<=63;i++) a[i]=1;    
   for (i=64;i<=67;i++) a[i]=1.5;
   for (i=68;i<=71;i++) a[i]=2;
   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;
   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;
   scanf("%d",&n);
   sumx=0;sumj=0;
   for (i=0;i<n;i++) 
     {scanf("%d",&b[i]);
      sumx=sumx+b[i];               
                     
     }
   for (i=0;i<n;i++)
   {scanf("%d",&x);
    sumj=sumj+a[x]*b[i];   
       
   } 
   
   jd=sumj/sumx;
   printf("%.2f",jd);
   return 0; 
    
    
}
int main(){
        int chengji[10], i, xuefen[10], n,j;
        int s=0;	
		double t=0;
double GPA,point[100];
scanf("%d",&n);
for(j=0;j<n;j++){
        scanf("%d",&xuefen[j]);
        s+=xuefen[j];
}
for(i=0;i<n;i++){
		scanf("%d",&chengji[i]);
	if((chengji[i]>=90)&&(chengji[i]<=100)){
		point[i]=4.0;
	}else if((chengji[i]>=85)&&(chengji[i]<=89)){
		point[i]=3.7;
	}else if((chengji[i]>=82)&&(chengji[i]<=84)){
		point[i]=3.3;
	}else if((chengji[i]>=78)&&(chengji[i]<=81)){
		point[i]=3.0;
	}else if((chengji[i]>=75)&&(chengji[i]<=77)){
		point[i]=2.7;
	}else if((chengji[i]>=72)&&(chengji[i]<74)){
		point[i]=2.3;
	}else if((chengji[i]>=68)&&(chengji[i]<=71)){
		point[i]=2.0;
	}else if((chengji[i]>=64)&&(chengji[i]<=67)){
		point[i]=1.5;
	}else if((chengji[i]>=60)&&(chengji[i]<=63)){
		point[i]=1.0;
	}else {
        point[i]=0;
	}
	t+=point[i]*xuefen[i];
	
	}
	GPA=1.0*t/s;
	printf("%.2f",GPA);
	return 0;
}
int main()
{
	int a[100],n,i,c;
	double d,e,b[100];
	scanf("%d",&n);
	for(i=0;i<=n-1;i++)
		scanf("%d",&a[i]);
	for(i=0;i<=n-1;i++)
		scanf("%lf",&b[i]);
	for(i=0;i<=n-1;i++)
	{
		if(b[i]>=90)
			b[i]=4.0;
			else 
				if(b[i]>=85)
					b[i]=3.7;
				else
					if(b[i]>=82)
						b[i]=3.3;
					else
						if(b[i]>=78)
							b[i]=3.0;
						else
							if(b[i]>=75)
								b[i]=2.7;
							else
								if(b[i]>=72)
									b[i]=2.3;
								else
									if(b[i]>=68)
										b[i]=2.0;
									else
										if(b[i]>=64)
											b[i]=1.5;
										else
											if(b[i]>=60)
												b[i]=1.0;
											else
												b[i]=0;
	}
	for(i=0;i<=n-1;i++)
		b[i]=a[i]*b[i];
	for(i=0,c=0;i<=n-1;i++)
		c=c+a[i];
	for(i=0,d=0;i<=n-1;i++)
		d=d+b[i];
	e=d/c;
	printf("%.2lf\n",e);
	return 0;
}
int main()
{
    int i,sum1=0,n,c[10],shiji[10];
float g[10] ,shidejidian[10],sum2=0;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&c[i]);
		sum1+=c[i];}
	for(i=0;i<n;i++)	{scanf("%d",&shiji[i]);
	if(shiji[i]>89)g[i]=4.0;
	else if(shiji[i]>84)g[i]=3.7;
	else if(shiji[i]>81)g[i]=3.3;
	else if(shiji[i]>77)g[i]=3.0;
	else if(shiji[i]>74)g[i]=2.7;
	else if(shiji[i]>71)g[i]=2.3;
	else if(shiji[i]>67)g[i]=2.0;
	else if(shiji[i]>63)g[i]=1.5;
	else if(shiji[i]>59)g[i]=1.0;
	else g[i]=0;
	shidejidian[i]=g[i]*c[i];
	sum2+=shidejidian[i];}
	printf("%.2f",(float)sum2/sum1);





}
float mark(int a)
{
	if(a>=90&&a<=100)
		return(4.0);
	else if(a>=85&&a<=89)
		return(3.7);
	else if(a>=82&&a<=84)
		return(3.3);
	else if(a>=78&&a<=81)
		return(3.0);
	else if(a>=75&&a<=77)
		return(2.7);
	else if(a>=72&&a<=74)
		return(2.3);
	else if(a>=68&&a<=71)
		return(2.0);
	else if(a>=64&&a<=67)
		return(1.5);
	else if(a>=60&&a<=63)
		return(1.0);
	else if(a<=59)
		return(0);
}
int main()
{
	int n;
	int all[10]={0};
	int score[10]={0};
	float GPA;
	scanf("%d",&n);
	int i;
	for(i=0;i<n;i++)
		scanf("%d",&all[i]);
	for(i=0;i<n;i++)
		scanf("%d",&score[i]);
	float grade[10]={0};
	for(i=0;i<n;i++)
		grade[i]=mark(score[i]);
	float sum1,sum2;
	for(sum1=0,i=0;i<n;i++)
		sum1+=grade[i]*all[i];
	for(sum2=0,i=0;i<n;i++)
		sum2+=all[i];
	GPA=sum1/sum2;
	printf("%.2f",GPA);
	return(0);
}
int main(){
    int n,i,XF;
    double GPA;
    scanf("%d",&n);
    int xf[n],cj[n];
    double gp[n],gpa;
    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]>89){gp[i]=4.0;
        }else if(cj[i]>84&&cj[i]<90){
            gp[i]=3.7;
        }else if(cj[i]>81&&cj[i]<85){
            gp[i]=3.3;
        }else if(cj[i]>77&&cj[i]<82){
            gp[i]=3.0;
        }else if(cj[i]>74&&cj[i]<78){
            gp[i]=2.7;
        }else if(cj[i]>71&&cj[i]<75){
            gp[i]=2.3;
        }else if(cj[i]>67&&cj[i]<72){
            gp[i]=2.0;
        }else if(cj[i]>63&&cj[i]<68){
            gp[i]=1.5;
        }else if(cj[i]>59&&cj[i]<64){
            gp[i]=1;
        }else{
            gp[i]=0;
        }
    }
    gpa=0,XF=0;
    for(i=0;i<n;i++){
        gpa=gpa+xf[i]*gp[i];
    }
    for(i=0;i<n;i++){
        XF=XF+xf[i];
    }
    GPA=gpa/XF;
    printf("%.2lf",GPA);
    return 0;
}
int main(){
	int n,i;
	scanf("%d",&n);
	int xf[10],u[10];
	double sz[10],xfjd[10],sum,k,GPA;
	sum=0;
	k=0;
	for(i=0;i<n;i++){
	   scanf("%d",&xf[i]);
	}
	for(i=0;i<n;i++){
	   scanf("%d",&u[i]);
	  }
    for(i=0;i<n;i++){
 		if(u[i]>=90){
		  sz[i]=4.0;
	     }else if(u[i]<90&&u[i]>=85){
		  sz[i]=3.7;
         }else if(u[i]<85&&u[i]>=82){
			sz[i]=3.3;
         }else if(u[i]<82&&u[i]>=78){
			  sz[i]=3.0;
		 }else if(u[i]<78&&u[i]>=75){
				sz[i]=2.7;
		 }else if(u[i]<75&&u[i]>=72){
				  sz[i]=2.3;
         }else if(u[i]<72&&u[i]>=68){ 
				sz[i]=2.0;
		 }else if(u[i]<68&&u[i]>=64){
					  sz[i]=1.5;
           }else if(u[i]<64&&u[i]>=60){
						sz[i]=1.0;
			}else{
						  sz[i]=0;
		 }
			xfjd[i]=sz[i]*xf[i];
			sum+=xfjd[i];
			k+=xf[i];                         

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

        
	return 0;
	}
double zpjd (int n,int a[],int b[]);
int main(){
	int n,i;
	double c;
    scanf("%d",&n);
	int a[9],b[9];
	for(i=0;i<n;i++){
		scanf("%d",&b[i]);
	}
	for(i=0;i<n;i++){
		scanf("%d",&a[i]);
	}
	c=zpjd(n,a,b);
	printf("%.2lf",c);
	return 0;
}
double zpjd(int n,int a[],int b[]){
	int i=0;
	double ax[9];
	for(i=0;i<n;i++){
		if(a[i]>=90&&a[i]<=100){
			ax[i]=4.0;
		}
		else if(a[i]>=85&&a[i]<=89){
			ax[i]=3.7;
		}
		else if(a[i]>=82&&a[i]<=84){
			ax[i]=3.3;
		}
		else if(a[i]>=78&&a[i]<=81){
			ax[i]=3.0;
		}
		else if(a[i]>=75&&a[i]<=77){
			ax[i]=2.7;
		}
		else if(a[i]>=72&&a[i]<=74){
			ax[i]=2.3;
		}
		else if(a[i]>=68&&a[i]<=71){
			ax[i]=2.0;
		}
		else if(a[i]>=64&&a[i]<=67){
			ax[i]=1.5;
		}
		else if(a[i]>=60&&a[i]<=63){
			ax[i]=1.0;
		}
		else if(a[i]<=59){
			ax[i]=0;
		}
	}
	double s1,s2,c;
	s1=0;
	s2=0;
	for(i=0;i<n;i++){
		s1=s1+ax[i]*b[i]*1,0;
	}
	for(i=0;i<n;i++){
		s2=s2+b[i]*1.0;
	}
	c=s1/s2*1.0;
	return c;
}
double cl(int a){
	if(a>=90)return 4;	
	if(a>=85)return 3.7;
	if(a>=82)return 3.3;
	if(a>=78)return 3;
	if(a>=75)return 2.7;
	if(a>=72)return 2.3;
	if(a>=68)return 2;
	if(a>=64)return 1.5;
	if(a>=60)return 1;
	return 0;
}
int main(){
int n;
cin>>n;
double f[10];
double s=0;
for(int i=0;i<n;i++){
	cin>>f[i];
	s+=f[i];
}
double gpa=0;
for(int i=0;i<n;i++){
	int a;
	cin>>a;
	gpa+=cl(a)*f[i];
}
printf("%.2f",gpa/s);
return 0;
}
int main(){
	int n,i;
	scanf("%d",&n);
	int cj[10],xf[10],s2=0;
	double jd[10],xfjd[10],s1=0.0,gpa;
	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.0;
		}
		else if(cj[i]>=85&&cj[i]<=89){
		jd[i]=3.7;
		}
		else if(cj[i]>=82&&cj[i]<=84){
		jd[i]=3.3;
		}
		else if(cj[i]>=78&&cj[i]<=81){
		jd[i]=3.0;
		}
		else if(cj[i]>=75&&cj[i]<=77){
		jd[i]=2.7;
		}
		else if(cj[i]>=72&&cj[i]<=74){
		jd[i]=2.3;
		}
		else if(cj[i]>=68&&cj[i]<=71){
		jd[i]=2.0;
		}
		else if(cj[i]>=64){
		jd[i]=1.5;
		}
		else if(cj[i]>=60){
		jd[i]=1.0;
		}
		else{
		jd[i]=0.0;
		}

	}
for(i=0;i<n;i++){
xfjd[i]=xf[i]*jd[i];
s1=s1+xfjd[i];
s2=s2+xf[i];
}
gpa=s1/s2;
printf("%.2lf",gpa);
return 0;
}
int main(){
    int n,i,s;
    double GPA,x;
    int xuefen[10];
    int defen[10];
    double jidian[10];
    scanf("%d\n",&n);
    for(i=0;i<=n-2;i++){
        scanf(" %d",&(xuefen[i]));
    }
    scanf(" %d\n",&(xuefen[n-1]));
    for(i=0;i<=n-1;i++){
        scanf(" %d",&(defen[i]));
    }for(i=0,s=0;i<=n-1;i++){
        s=s+xuefen[i];
    }for(i=0;i<=n-1;i++){
        if(defen[i]>=90){
            jidian[i]=4.0;
        }else if(defen[i]>=85&&defen[i]<=89){
            jidian[i]=3.7;
        }else if(defen[i]>=82&&defen[i]<=84){
            jidian[i]=3.3;
        }else if(defen[i]>=78&&defen[i]<=81){
            jidian[i]=3.0;
        }else if(defen[i]>=75&&defen[i]<=77){
            jidian[i]=2.7;
        }else if(defen[i]>=72&&defen[i]<=74){
            jidian[i]=2.3;
        }else if(defen[i]>=68&&defen[i]<=71){
            jidian[i]=2.0;
        }else if(defen[i]>=64&&defen[i]<=67){
            jidian[i]=1.5;
        }else if(defen[i]>=60&&defen[i]<=63){
            jidian[i]=1.0;
        }else if(defen[i]<60){
            jidian[i]=0;
        }
    }for(i=0;i<=n-1;i++){
        x=x+1.0*jidian[i]*xuefen[i];
    }GPA=x/s;
    printf("%.2lf\n",GPA);
    return 0;
}
int main()
{
	int numb,a[100],b[100],i,N=0,y,M=0,m=65535;
	float c[100],S=0,t;
	scanf("%d",&numb);
	for (i=0;i<numb;i++)
	{
		scanf("%d",&a[i]);
		N=N+a[i];
	}
	for (i=0;i<numb;i++)
	{
		scanf("%d",&b[i]);
		if (b[i]<101&&b[i]>89)
		c[i]=4.0;
		if (b[i]<90&&b[i]>84)
		c[i]=3.7;
		if (b[i]<85&&b[i]>81)
		c[i]=3.3;
		if (b[i]<82&&b[i]>77)
		c[i]=3.0;
		if (b[i]<78&&b[i]>74)
		c[i]=2.7;
		if (b[i]<75&&b[i]>71)
		c[i]=2.3;
		if (b[i]<72&&b[i]>67)
		c[i]=2.0;
		if (b[i]<68&&b[i]>63)
		c[i]=1.5;
		if (b[i]<64&&b[i]>59)
		c[i]=1.0;
		if (b[i]<60&&b[i]>=0)
		c[i]=0;
		S=c[i]*a[i]+S;
	}
	t=S/N;
	printf("%.2f",t);
	return 0;
}
int main(){ 
    int n,i,sum=0;
	double z=0,t[M];

	int xf[M],g[M];
	scanf("%d",&n);
	for(i=1;i<=n;i++){
		scanf("%d",&xf[i]);
		sum+=xf[i];

	}

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

		if(g[i]>=90){t[i]=4.0;}

        z+=t[i]*xf[i];		
	
	}
    printf("%.2lf",z/sum);
    
		
	return 0;

}