semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
int n,i,a;
double GPA,num;
double score [10];
int point [10];
scanf("%d",&n);
i=0;
while(i<n){
	scanf("%d",&point [i]);
	i++;
}
i=0;
while(i<n){
	scanf("%lf",&score [i]);
	i++;
}
i=0;
while(i<n){
	if(score [i]>=90){
		score [i]=4.0;
	}else if(score [i]<90&&score [i]>=85){
		score [i]=3.7;
	}else if(score [i]<85&&score [i]>=82){
		score [i]=3.3;
	}else if(score [i]<82&&score [i]>=78){
		score [i]=3.0;
	}else if(score [i]<78&&score [i]>=75){
		score [i]=2.7;
	}else if(score [i]<75&&score [i]>=72){
		score [i]=2.3;
	}else if(score [i]<72&&score [i]>=68){
		score [i]=2.0;
	}else if(score [i]<68&&score [i]>=64){
		score [i]=1.5;
	}else if(score [i]<64&&score [i]>=60){
		score [i]=1.0;
	}else{
		score [i]=0;
	}
	i++;
}
i=0;
num=0;
while(i<n){
	num=(score [i])*(point [i])+num;
	i++;
}
i=0;
a=0;
while(i<n){
	a=(point [i])+a;
	i++;
}
GPA=num/a;
printf("%.2lf\n",GPA);
return 0;
}
void main()
{
	int n,i;
	float score[10],sum=0,a[10],c[10],t=0;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%f",&a[i]);
	}
	for(i=0;i<n;i++)
	{
		sum=sum+a[i];
	}
	for(i=0;i<n;i++)
	{
		scanf("%f",&score[i]);
	}
	for(i=0;i<n;i++)
	{
		if(score[i]<=100&&score[i]>=90)c[i]=4;
		else if(score[i]<=89&&score[i]>=85)c[i]=3.7;
		else if(score[i]<=84&&score[i]>=82)c[i]=3.3;
		else if(score[i]<=81&&score[i]>=78)c[i]=3.0;
		else if(score[i]<=77&&score[i]>=75)c[i]=2.7;
		else if(score[i]<=74&&score[i]>=72)c[i]=2.3;
		else if(score[i]<=71&&score[i]>=68)c[i]=2.0;
		else if(score[i]<=67&&score[i]>=64)c[i]=1.5;
		else if(score[i]<=63&&score[i]>=60)c[i]=1.0;
		else c[i]=0;
	}
	for(i=0;i<n;i++)
	{
		t=t+c[i]*a[i];
	}
	printf("%.2f\n",t/sum);
}
int main()
{
    int i,n,sumxf=0;
	int xf[10],df[10];
	double GPA,sumGPA=0;
	scanf("%d",&n);
	for(i=0;i<=n-1;i++){
		if(i<n-1){
			scanf("%d ",&xf[i]);
		}else{
			scanf("%d",&xf[i]);
		}
	}
	for(i=0;i<=n-1;i++){
		if(i<n-1){
			scanf("%d ",&df[i]);
		}else{
			scanf("%d",&df[i]);
		}
	}
	for(i=0;i<=n-1;i++){
		if(df[i]<=100&&df[i]>=90){
			sumGPA+=4.0*xf[i];
		}else if(df[i]<=89&&df[i]>=85){
			sumGPA+=3.7*xf[i];
		}else if(df[i]<=84&&df[i]>=82){
			sumGPA+=3.3*xf[i];
		}else if(df[i]<=81&&df[i]>=78){
			sumGPA+=3.0*xf[i];
		}else if(df[i]<=77&&df[i]>=75){
			sumGPA+=2.7*xf[i];
		}else if(df[i]<=74&&df[i]>=72){
			sumGPA+=2.3*xf[i];
		}else if(df[i]<=71&&df[i]>=68){
			sumGPA+=2.0*xf[i];
		}else if(df[i]<=67&&df[i]>=64){
			sumGPA+=1.5*xf[i];
		}else if(df[i]<=63&&df[i]>=60){
			sumGPA+=1.0*xf[i];
		}else if(df[i]<60){
			sumGPA+=0;
		}
	}
	for(i=0;i<=n-1;i++){
		sumxf+=xf[i];
	}
	GPA=(sumGPA*0.1)/(sumxf*0.1);
	printf("%.2lf",GPA);

    return 0;
}
void main()
{
	int i,j,n;
	double x,y,GPA;
	int a[2][101];float b[101],c[101];
	scanf("%d",&n);
	for(i=0;i<=1;i++)
	
		for(j=0;j<n;j++)
			scanf("%d",&a[i][j]);
		for(j=0;j<n;j++)
		{
			
			if(a[1][j]<=100&&a[1][j]>=90)
			b[j]=4.0;   
		    else if(a[1][j]<=89&&a[1][j]>=85)
				b[j]=3.7;
		    else if(a[1][j]<=84&&a[1][j]>=82)
					b[j]=3.3;
			else if(a[1][j]<=81&&a[1][j]>=78)
						b[j]=3.0;	
			else	if(a[1][j]<=77&&a[1][j]>=75)
							b[j]=2.7;					
		    else if(a[1][j]<=74&&a[1][j]>=72)
								b[j]=2.3;				
			else if(a[1][j]<=71&&a[1][j]>=68)
								b[j]=2.0;
			else if(a[1][j]<=67&&a[1][j]>=64)
								b[j]=1.5;
			else if(a[1][j]<=63&&a[1][j]>=60)
								b[j]=1.0;
			else b[j]=0;
		}
			for(j=0;j<n;j++)				
				
			c[j]=a[0][j]*b[j];x=0;y=0;
		
     	for(j=0;j<n;j++)
		{
	        x=x+c[j];y=y+a[0][j];
		}
	      	GPA=x/y;
		     printf("%.2f",GPA);
}
void main()
{
	double a[10],b[10],c[10];
	double x=0,y=0;
	int n,i;
	scanf("%d",&n);
	for (i=0;i<n;i++)
	{
		scanf("%lf",&a[i]);
	}
	for (i=0;i<n;i++)
	{
		scanf("%lf",&b[i]);
	}
	for (i=0;i<n;i++)
	{
		if (b[i]<=100&&b[i]>=90)
		c[i]=4.0*a[i];
		if (b[i]<=89&&b[i]>=85)
		c[i]=3.7*a[i];
		if (b[i]<=84&&b[i]>=82)
		c[i]=3.3*a[i];
		if (b[i]<=81&&b[i]>=78)
		c[i]=3.0*a[i];
		if (b[i]<=77&&b[i]>=75)
		c[i]=2.7*a[i];
		if (b[i]<=74&&b[i]>=72)
		c[i]=2.3*a[i];
		if (b[i]<=71&&b[i]>=68)
		c[i]=2.0*a[i];
		if (b[i]<=67&&b[i]>=64)
		c[i]=1.5*a[i];
		if (b[i]<=63&&b[i]>=60)
		c[i]=1.0*a[i];
		if (b[i]<60)
		c[i]=0*a[i];
	}
	for (i=0;i<n;i++)
	{
		x=x+a[i];
	}
	for (i=0;i<n;i++)
	{
		y=y+c[i];
	}
	printf("%.2lf",y/x);
}
int main()
{
int m,a[123],c[123],i,j,k,l;
float b[123],o;
scanf("%d",&m);
i=0;
l=0;
while(i<m){
	scanf("%d",&a[i]);
	l=l+a[i];
	i++;
}
j=0;
while(j<m){
scanf("%d",&c[j]);
if(c[j]>=90&&c[j]<=100){b[j]=4.0;}
else if(c[j]<=89&&c[j]>=85){b[j]=3.7;}
else if(c[j]<=84&&c[j]>=82){b[j]=3.3;}
else if(c[j]<=81&&c[j]>=78){b[j]=3.0;}
else if(c[j]<=77&&c[j]>=75){b[j]=2.7;}
else if(c[j]<=74&&c[j]>=72){b[j]=2.3;}
else if(c[j]<=71&&c[j]>=68){b[j]=2.0;}
else if(c[j]<=67&&c[j]>=64){b[j]=1.5;}
else if(c[j]<=63&&c[j]>=60){b[j]=1.0;}
else {b[j]=0;}
j++;
}
o=0;
k=0;
while(k<m){
o=o+a[k]*b[k];
k++;
}
o=o/l;
printf("%.2f",o);
return 0;
}
int main(){
	int n,i=0,j=0;
	int sz[2][10];
	double a[10];
	int sum1=0;
	double sum2=0,gpa=0;
	scanf("%d",&n);
	for(i=0;i<2;i++){
		for(j=0;j<n;j++){
			scanf("%d",&sz[i][j]);
		}
	}
	for(j=0;j<n;j++){
		sum1+=sz[0][j];
	}
	for(j=0;j<n;j++){
		if(sz[1][j]>=90&&sz[1][j]<=100){
			a[j]=4.0;
		}else if(sz[1][j]>=85&&sz[1][j]<=89){
			a[j]=3.7;
		}else if(sz[1][j]>=82&&sz[1][j]<=84){
			a[j]=3.3;
		}else if(sz[1][j]>=78&&sz[1][j]<=81){
			a[j]=3.0;
		}else if(sz[1][j]>=75&&sz[1][j]<=77){
			a[j]=2.7;
		}else if(sz[1][j]>=72&&sz[1][j]<=74){
			a[j]=2.3;
		}else if(sz[1][j]>=68&&sz[1][j]<=71){
			a[j]=2.0;
		}else if(sz[1][j]>=64&&sz[1][j]<=67){
			a[j]=1.5;
		}else if(sz[1][j]>=60&&sz[1][j]<=63){
			a[j]=1.0;
			
		}else{
			a[j]=0;
		}
	}
	for(j=0;j<n;j++){
		sum2+=(double)sz[0][j]*a[j];
	}
	gpa=(double)sum2/sum1;
	printf("%.2f",gpa);
	return 0;
}
int main (){
   int n,i,sz1[100],sz2[100];
   double a,b[100],GPA,sum,su;
   a=0;
   GPA=0;
   su=0;
   sum=0;
   scanf("%d",&n);
   for(i=0;i<n;i++)
   {
	   scanf("%d",&sz1[i]);
   }
   for(i=0;i<n;i++)
   {
	   scanf("%d",&sz2[i]);
   }
    for(i=0;i<n;i++)
	{
		if(sz2[i]<60)
		{
			a=0;
		}
		else if(sz2[i]>=60 && sz2[i]<=63)
		{
			a=1.3;
		}
			
		else if(sz2[i]>=64&&sz2[i]<=67)
		{
			a=1.5;
		}
		else if(sz2[i]>=68&&sz2[i]<=71)
		{
			a=2.0;
		}
		else if(sz2[i]>=72&&sz2[i]<=74)
		{
			a=2.3;
		}
		else if(sz2[i]>=75&&sz2[i]<=77)
		{
			a=2.7;
		}
		else if(sz2[i]>=78&&sz2[i]<=81)
		{
			a=3.0;
		}
		else if(sz2[i]>=82&&sz2[i]<=84)
		{
			a=3.3;
		}
		else if(sz2[i]>=85&&sz2[i]<=89)
		{
			a=3.7;
		}
		else if(sz2[i]>=90)
		{
			a=4.0;
		}
	b[i]=1.0 * sz1[i]*a;
	}
	for(i=0;i<n;i++)
	{
		su=su+sz1[i]*1.0;
	}
	for(i=0;i<n;i++)
	{
		sum=sum+b[i];
	}
	GPA=sum/su;
	printf("%.2lf",GPA);
	return 0;
}
double gc(int m); 
int main(){
    int n,s,i; 
    s=0; 
    scanf("%d",&n); 
    double gpa=0; 
    int a[n],b[n]; 
    for(i=0;i<=n-1;i++)
    {
                       scanf("%d",&a[i]);
                       s+=a[i]; 
    }
    for(i=0;i<=n-1;i++)
    {
                       scanf("%d",&b[i]);
                       gpa+=gc(b[i])*a[i]; 
    }
    gpa=gpa/s; 
    printf("%.2lf",gpa);
 
    return 0;
} 
double gc(int m)
{
       int v=1;
       int x=60; 
       while(x<101)
       {
             if(x<=m)v++;else break; 
             if((x<=68)||(x==78)) x+=4;
               else
               {if((x<78)||(x==82))x+=3;
                    else 
                    {if(x==85)x+=5; else 
                       {if(x==90)x=100;
                        else x=101;}
                    } 
               }

       } 
             
       switch(v) 
       {
              case 1: return 0;
              case 2:return 1.0;break; 
              case 3:return 1.5;break;
              case 4:return 2.0;break;
              case 5:return 2.3;break;
              case 6:return 2.7;break;
              case 7:return 3.0;break;
              case 8:return 3.3;break;
              case 9:return 3.7;break;
              case 10:return 4.0;break;
       }
}
void main()
{
	int a[10],b[10],j,n;
	float p=0,q=0,c[10];
	scanf("%d",&n);
	for(j=0;j<=n-1;j++)
	scanf("%d ",&a[j]);
	for(j=0;j<=n-1;j++)
	scanf("%d ",&b[j]);
	for(j=0;j<n;j++)
	{
		if(b[j]>=90&&b[j]<=100)
			c[j]=4.0;
		if(b[j]>=85&&b[j]<=89)
			c[j]=3.7;
		if(b[j]>=82&&b[j]<=84)
			c[j]=3.3;
		if(b[j]>=78&&b[j]<=81)
			c[j]=3.0;
		if(b[j]>=75&&b[j]<=77)
			c[j]=2.7;
		if(b[j]>=72&&b[j]<=74)
			c[j]=2.3;
		if(b[j]>=60&&b[j]<=63)
			c[j]=1.0;
		if(b[j]>=68&&b[j]<=71)
			c[j]=2.0;
		if(b[j]>=64&&b[j]<=67)
			c[j]=1.5;
		if(b[j]<60)
			c[j]=0.0;
	}
	for(j=0;j<=n-1;j++)
		p=p+a[j];
	for(j=0;j<=n-1;j++)
		q=q+a[j]*c[j];
	printf("%.2f",q/p);
}
void main()
{float f(int a);
int n,i,a[10],b[10];
float x=0.00,y=0.00;
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++)
{x=x+(a[i])*(f(b[i]));
y=y+a[i];}
x=x/y;
printf("%.2f",x);
}
float f(int a)
{float z;
if(101>a&&a>89)
z=4.0;
else if(90>a&&a>84)
z=3.7;
else if(85>a&&a>81)
z=3.3;
else if(82>a&&a>77)
z=3.0;
else if(78>a&&a>74)
z=2.7;
else if(75>a&&a>71)
z=2.3;
else if(72>a&&a>67)
z=2.0;
else if(68>a&&a>63)
z=1.5;
else if(64>a&&a>59)
z=1.0;
else z=0;
return(z);
}
int main()
{
	int n,a[10],b[10],i,t=0;
	float c[10],s=0;
	cin>>n;
	for(i=0;i<n;i++)
	{
		cin>>a[i];
		t=t+a[i];
	}
	for(i=0;i<n;i++)
	{
		cin>>b[i];
		if(b[i]>=60)
		{
			if(b[i]>63)
			{
				if(b[i]>67)
				{
					if(b[i]>71)
					{
						if(b[i]>74)
						{
							if(b[i]>77)
							{
								if(b[i]>81)
								{
									if(b[i]>84)
									{
										if(b[i]>89)
										{
											c[i]=4.0;
										}
										else
										{
											c[i]=3.7;
										}
									}
									else
									{
										c[i]=3.3;
									}
								}
								else
								{
									c[i]=3.0;
								}
							}
							else
							{
								c[i]=2.7;
							}
						}
						else
						{
							c[i]=2.3;
						}
					}
					else
					{
						c[i]=2.0;
					}
				}
				else
				{
					c[i]=1.5;
				}
			}
			else
			{
				c[i]=1.0;
			}
		}
		else
		{
			c[i]=0;
		}
	}
	for(i=0;i<n;i++)
	{
		c[i]=a[i]*c[i];
		s=s+c[i];
	}
	s=s/t;
	cout<<fixed<<setprecision(2)<<s;
	return 0;
}
int main(){
 struct course{
  float xf;
  float df;
 }course[N];
 float course_jd[N],jd,zxf;
 int n,i;
 scanf("%d\n",&n);
 for(i=0;i<n-1;i++){
  scanf("%f",&(course[i].xf));
 }scanf("%f\n",&(course[n-1].xf));
 for(i=0;i<n;i++){
  scanf("%f",&(course[i].df));
 }
 jd=0;
 for(i=0;i<n;i++){
  if ((course[i].df>=90)&&(course[i].df<=100))
	  course_jd[i]=4.0*course[i].xf;
  if ((course[i].df>=85)&&(course[i].df<=89))
	  course_jd[i]=3.7*course[i].xf;
  if ((course[i].df>=82)&&(course[i].df<=84))
	  course_jd[i]=3.3*course[i].xf;
  if ((course[i].df>=78)&&(course[i].df<=81))
	  course_jd[i]=3.0*course[i].xf;
  if ((course[i].df>=75)&&(course[i].df<=77))
	  course_jd[i]=2.7*course[i].xf;
  if ((course[i].df>=72)&&(course[i].df<=74))
	  course_jd[i]=2.3*course[i].xf;
  if ((course[i].df>=68)&&(course[i].df<=71))
	  course_jd[i]=2.0*course[i].xf;
  if ((course[i].df>=64)&&(course[i].df<=67))
	  course_jd[i]=1.5*course[i].xf;
  if ((course[i].df>=60)&&(course[i].df<=63))
	  course_jd[i]=1.0*course[i].xf;
  if ((course[i].df<=59))
	  course_jd[i]=0*course[i].xf;
  jd=jd+course_jd[i];
 }zxf=0;
 for(i=0;i<n;i++){
  zxf+=course[i].xf;
 }
  printf("%.2f",jd/zxf);
  return 0;
}
int main()
{
    int n,i;
    double sum,GPA,temp;
    scanf("%d",&n);
    int d[n];
    double c[n],b[n],a[n];
    for(i=1;i<=n;i++)
    {
                     scanf("%lf",&a[i]);
                     }
    for(i=1;i<=n;i++)
    {
                     scanf("%d",&d[i]);
                     }
    for(i=1;i<=n;i++)
    {
                     if(d[i]<=100&&d[i]>=90)
                     {
                                            b[i]=4.0;
                                            }
                     if(d[i]<=89&&d[i]>=85)
                     {
                                            b[i]=3.7;
                                            }
                     if(d[i]<=84&&d[i]>=82)
                     {
                                            b[i]=3.3;
                                            }
                     if(d[i]<=81&&d[i]>=78)
                     {
                                            b[i]=3.0;
                                            }
                     if(d[i]<=77&&d[i]>=75)
                     {
                                            b[i]=2.7;
                                            }
                     if(d[i]<=74&&d[i]>=72)
                     {
                                            b[i]=2.3;
                                            }
                     if(d[i]<=71&&d[i]>=68)
                     {
                                            b[i]=2.0;
                                            }
                     if(d[i]<=67&&d[i]>=64)
                     {
                                            b[i]=1.5;
                                            }
                     if(d[i]<=63&&d[i]>=60)
                     {
                                            b[i]=1.0;
                                            }
                     if(d[i]<60)
                     {
                                b[i]=0;
                                            }
    }
    for(i=1;i<=n;i++)
    {
                     c[i]=a[i]*b[i];
                     }
    sum=0;
    temp=0;
    for(i=1;i<=n;i++)
    {
                      sum=sum+a[i];
                      }
    for(i=1;i<=n;i++)
    {
                     temp=temp+c[i];
                     }
    GPA=temp/sum;
    printf("%.2lf",GPA);
    return 0;
}
int main()
{int n,i;
scanf("%d",&n);
int d[n],a[n];
double GPA,k=0,y=0,j[n],x[n];
for(i=0;i<n;i++){
 scanf("%lf ",&x[i]);
}
for(i=0;i<n;i++){
  scanf("%d ",&d[i]);}
for(i=0;i<n;i++){
  if(d[i]>=90&&d[i]<=100)
     j[i]=4.0;
   if(d[i]>=85&&d[i]<=89)
     j[i]=3.7;
if(d[i]>=82&&d[i]<=84) 
     j[i]=3.3;
if(d[i]>=78&&d[i]<=81)
     j[i]=3.0;
if(d[i]>=75&&d[i]<=77)
     j[i]=2.7;
if(d[i]>=72&&d[i]<=74)
     j[i]=2.3;
if(d[i]>=68&&d[i]<=71)
     j[i]=2.0;
if(d[i]>=64&&d[i]<=67)
     j[i]=1.5;
if(d[i]>=60&&d[i]<=63)
     j[i]=1.0;
if(d[i]<60)
     j[i]=0;
}
for(i=0;i<n;i++){
 k+=j[i]*x[i];
 y+=x[i];}
GPA=k/y;
printf("%.2lf",GPA);
return 0;
}
int main()
{
    int n, i, k;
    double p, j, s;
    s=0;
    k=0;
    scanf("%d", &n);
    int xf[100], df[100];
    for(i=0;i<=n-1;i++){
        scanf("%d", &xf[i]);}
    for(i=0;i<=n-1;i++){
        scanf("%d", &df[i]);}
    for(i=0;i<=n-1;i++){
        if(df[i]>=90&&df[i]<=100)
            j=4.0;
            else if(df[i]>=85&&df[i]<=89)
                j=3.7;
                else if(df[i]>=82&&df[i]<=84)
                    j=3.3;
                    else if(df[i]>=78&&df[i]<=81)
                        j=3.0;
                        else if(df[i]>=75&&df[i]<=77)
                            j=2.7;
                            else if(df[i]>=72&&df[i]<=74)
                                j=2.3;
                                else if(df[i]>=68&&df[i]<=71)
                                    j=2.0;
                                    else if(df[i]>=64&&df[i]<=71)
                                        j=1.5;
                                        else if(df[i]>=60&&df[i]<=63)
                                            j=1.0;
                                            else if(df[i]<60)
                                                j=0;
    s=s+j*xf[i];
    k=k+xf[i];
    }
    p=(double)s/k;
    printf("%.2lf", p);
    return 0;
}
void main()
{
	int m,i,j;
double b=0,c=0;
	scanf("%d",&m);
	int a[2][11];
	for(i=0;i<=m-1;i++) scanf("%d",&a[0][i]);
	
		for(j=0;j<=m-1;j++)
		{	 scanf("%d",&a[1][j]);
			 if(a[1][j]>=90) b=b+4.0*a[0][j];
			 else if(a[1][j]>=85) b=b+3.7*a[0][j];
			 else if(a[1][j]>=82) b=b+3.3*a[0][j];
                         else if(a[1][j]>=78) b=b+3.0*a[0][j];
                         else if(a[1][j]>=75) b=b+2.7*a[0][j];
                         else if(a[1][j]>=72) b=b+2.3*a[0][j];
                         else if(a[1][j]>=68) b=b+2.0*a[0][j];
                         else if(a[1][j]>=64) b=b+1.5*a[0][j];
                         else if(a[1][j]>=60) b=b+1.0*a[0][j];
		}
        
                       for(j=0;j<=m-1;j++) c=c+a[0][j];
	printf("%.2f",b/c);
}
float jd(int kccj){
	float kcjd;
	if(kccj>=90){
		kcjd=4;
	}else{
		if(85<=kccj&&kccj<=89){
			kcjd=3.7;
		}else{
			if(82<=kccj&&kccj<=84){
				kcjd=3.3;
			}else{
				if(kccj>=78&&kccj<=81){
					kcjd=3.0;
				}else{
					if(kccj>=75&&kccj<=77){
						kcjd=2.7;
					}else{
						if(kccj>=72&&kccj<=74){
							kcjd=2.3;
						}else{
							if(kccj<=71&&kccj>=68){
								kcjd=2.0;
							}else{
								if(kccj<=67&&kccj>=64){
									kcjd=1.5;
								}else{
									if(kccj<=63&&kccj>=60){
										kcjd=1.0;
									}else{
										kcjd=0;
									}
								}
							}
						}
					}
				}
			}
		}
	}

return kcjd;
	}

int main(){
	int n;

	int xf[10];
	int i;
		scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&xf[i]);
	}
	int cj[10];
	for(i=0;i<n;i++){
		scanf("%d",&cj[i]);
	}
	int sum_xf=0;
	for(i=0;i<n;i++){
		sum_xf+=xf[i];
	}
	float xfjd[10];
	for(i=0;i<n;i++){
		xfjd[i]=xf[i]*jd(cj[i]);
	}
	float sum_xfjd=0;
	for(i=0;i<n;i++){
		sum_xfjd+=xfjd[i];
	}
	float gpa;
	gpa=sum_xfjd/sum_xf;
	printf("%.2f",gpa);

	return 0;
}
void main()
{
	int a[9]={0},b[9]={0},j,i,n;
	float c=0,d=0,e;
	scanf("%d",&n);
	for(i=0;i<=n-1;i++)
	{
		scanf("%d",&a[i]);
		c=c+a[i];
	}
	for(j=0;j<=n-1;j++)
	{
		scanf("%d",&b[j]);
		if(b[j]>=90)e=4.0;
		else if(b[j]>=85)e=3.7;
		else if(b[j]>=82)e=3.3;
		else if(b[j]>=78)e=3.0;
		else if(b[j]>=75)e=2.7;
		else if(b[j]>=72)e=2.3;
		else if(b[j]>=68)e=2.0;
		else if(b[j]>=64)e=1.5;
		else if(b[j]>=60)e=1.0;
		else e=0;
		d=d+a[j]*e;
	}
	c=d/c;
	printf("%.2f",c);
}
int main(){
	int a[10],i,sum,n;
	float b[10],c[10];
	scanf("%d",&n);
	scanf("%d",&a[0]);
	sum=a[0];
	for(i=1;i<n;i++){
		scanf(" %d",&a[i]);
		sum+=a[i];
	}
	scanf("%f",&b[0]);
	for(i=1;i<n;i++){
		scanf(" %f",&b[i]);
	}
	for(i=0;i<n;i++){
		if((b[i]>=90)&&(b[i]<=100)){
		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;
		}
	}
		float sum1=0;
		for(i=0;i<n;i++){
			sum1+=a[i]*c[i];
		}
		float GPA;
		GPA=sum1/sum;
		printf("%.2f",GPA);
		return 0;
}
int main(){
int sz[10];
int score[10];
double jidian[10],sumxuefen,sumjidian;
int n,xuefen,s;

scanf("%d",&n);
for(xuefen=0;xuefen<n;xuefen++){
    scanf("%d",&sz[xuefen]);
    sumxuefen+=sz[xuefen];
}
for(s=0;s<n;s++){
    scanf("%d",&score[s]);

}
for(s=0;s<n;s++){
    if((90<=score[s])&&(score[s]<=100)){
        jidian[s]=4.0;
	}else if((85<=score[s])&&(score[s]<=89)){
        jidian[s]=3.7;
	}else if((82<=score[s])&&(score[s]<=84)){
        jidian[s]=3.3;
	}else if((78<=score[s])&&(score[s]<=81)){
        jidian[s]=3.0;
	}else if((75<=score[s])&&(score[s]<=77)){
        jidian[s]=2.7;
	}else if((72<=score[s])&&(score[s]<=74)){
        jidian[s]=2.3;
	}else if((68<=score[s])&&(score[s]<=71)){
        jidian[s]=2.0;
	}else if((64<=score[s])&&(score[s]<=67)){
        jidian[s]=1.5;
	}else if((60<=score[s])&&(score[s]<=63)){
        jidian[s]=1.0;
	}else if(score[s]<60){
        jidian[s]=0;
	}
    sumjidian+=jidian[s]*sz[s];
}
double GPA;
GPA=sumjidian/sumxuefen;
printf("%.2lf",GPA);


return 0;
}
int main()
{
int i,n,s,k,a[11];
float sum=0;
scanf("%d",&n);
for(i=1;i<=n;i++)
{
scanf("%d",&a[i]);
}
for(i=1;i<=n;i++)
{
scanf("%d",&k);
switch(k)
{
case 90:
case 91:
case 92:
case 93:
case 94:
case 95:
case 96:
case 97:
case 98:
case 99:
case 100:
{
sum+=a[i]*4;
break;
}
case 85:
case 86:
case 87:
case 88:
case 89:
{
sum+=a[i]*3.7;
break;
}
case 82:
case 83:
case 84:
{
sum+=a[i]*3.3;
break;
}
case 78:
case 79:
case 80:
case 81:
{
sum+=a[i]*3;
break;
}
case 75:
case 76:
case 77:
{
sum+=a[i]*2.7;
break;
}
case 72:
case 73:
case 74:
{
sum+=a[i]*2.3;
break;
}
case 68:
case 69:
case 70:
case 71:
{
sum+=a[i]*2;
break;
}
case 64:
case 65:
case 66:
case 67:
{
sum+=a[i]*1.5;
break;
}
case 60:
case 61:
case 62:
case 63:
{
sum+=a[i];
break;
}
}
}
s=0;
for(i=1;i<=n;i++)
{
s+=a[i];
}
sum/=s;
printf("%.2f",sum);
return 0;
}
int main () {
    int n,i,grade;
    double gpa,sum1,sum2,GPA;
	sum1=0;
	sum2=0;
	scanf("%d",&n);
    int sz[n];
	for(i=0;i<n;i++){
		scanf("%d",&sz[i]);
	    sum2=sum2+sz[i];
	}
	for(i=0;i<n;i++){
		scanf("%d",&grade);
	if(grade>=90)
	       gpa=4.0;
	if((grade>=85)&&(grade<=89))
		   gpa=3.7;
    if((grade>=82)&&(grade<=84))
		   gpa=3.3;
    if((grade>=78)&&(grade<=81))
		   gpa=3.0;
    if((grade>=75)&&(grade<=77))
		   gpa=2.7;
    if((grade>=72)&&(grade<=74))
		   gpa=2.3;
    if((grade>=68)&&(grade<=71))
		   gpa=2.0;
    if((grade>=64)&&(grade<=67))
		   gpa=1.5;
    if((grade>=60)&&(grade<=63))
		   gpa=1.0; 
	if(grade<60)
		   gpa=0;
    sum1=sum1+gpa*sz[i];
    }
	GPA=sum1/sum2;
	printf("%.2lf",GPA);
	return 0;
}
void main(){
	int n,i,xf[10],a[10];
	float GPA=0,b,sum=0;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&xf[i]);
		sum+=xf[i];
	}
	for(i=0;i<n;i++)
		scanf("%d",&a[i]);
	for(i=0;i<n;i++){
		if(a[i]>=90) b=4.0;
		if(a[i]<=89 && a[i]>=85) b=3.7;
		if(a[i]<=84 && a[i]>=82) b=3.3;
		if(a[i]<=81 && a[i]>=78) b=3.0;
		if(a[i]<=77 && a[i]>=75) b=2.7;
		if(a[i]<=74 && a[i]>=72) b=2.3;
		if(a[i]<=71 && a[i]>=68) b=2.0;
		if(a[i]<=67 && a[i]>=64) b=1.5;
		if(a[i]<=63 && a[i]>=60) b=1.0;
		if(a[i]<60) b=0.0;
		GPA+=b*xf[i];
	}
	printf("%.2f",GPA/sum);
}
int main()
{
 double a[11],b[11],s,m,f;
 int n,i,j,k;
 scanf("%d\n",&n);
  m=0;
 for(j=1;j<=n;j++)
 { scanf("%lf",&b[j]);
   m=m+b[j];
  }
 for(i=1;i<=n;i++)
 {
   scanf("%lf",&a[i]);
   if(a[i]>=60)
    {
    if((a[i]>=90) &&(a[i]<=100)) a[i]=4.0;
    if((a[i]>=85) &&(a[i]<=90)) a[i]=3.7;
    if((a[i]>=82) &&(a[i]<=84)) a[i]=3.3;
    if((a[i]>=78) &&(a[i]<=81)) a[i]=3.0;
    if((a[i]>=75) &&(a[i]<=77)) a[i]=2.7;
    if((a[i]>=72) &&(a[i]<=74)) a[i]=2.3;
    if((a[i]>=68) &&(a[i]<=71)) a[i]=2.0;
    if((a[i]>=64) &&(a[i]<=67)) a[i]=1.5;
    if((a[i]>=60) &&(a[i]<=63)) a[i]=1.0;
    }
   else
     a[i]=0;
  }
  s=0;
  for(k=1;k<=n;k++)
      {s=s+a[k]*b[k];
       }
  f=s/m;
 printf("%.2lf",f);
 scanf("%d",&n);
 return 0;
}
int main()
{   int a[10],b[10],n,i,w1=0;
	double GPA,c[10],w=0;
	
	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]);	
	}
	
	
	
	for(i=0;i<=n-1;++i)
	{
	  if(b[i]<60){c[i]=0;}
	  else
	  {
	  	if(b[i]<=63){c[i]=1.0;}
	    else
	    {
	  	  if(b[i]<=67){c[i]=1.5;}
	      else
	      {
	  	    if(b[i]<=71){c[i]=2.0;}
	      else
	      {
	  	    if(b[i]<=74){c[i]=2.3;}
	      else
	      {
	  	    if(b[i]<=77){c[i]=2.7;}
	      else
	      {
	  	    if(b[i]<=81){c[i]=3.0;}
	      else
	      {
	  	    if(b[i]<=84){c[i]=3.3;}
	      else
	      {
	  	    if(b[i]<=89){c[i]=3.7;}
	      else
	      {
	  	    if(b[i]<=100){c[i]=4.0;}
	      else
	      {
	  	    
	      }
	      }
	      }
	      }
	      }
	      }
	      }
	      }
	      }	
	      }	
	}
	
	
	for(i=0;i<=n-1;++i)
	{
		w=w+a[i]*c[i];
	}
	
	for(i=0;i<=n-1;++i)
	{
	   	w1=w1+a[i];
	}
	printf("%3.2f",GPA=w/w1);
	
	
return 0;	
}
int main()
{
	int n,a[2][10],i,e,sum1=0;
	double b[10],sum2=0;
	scanf("%d",&n);
	for(i=0;i<2;i++)
	{
		for(e=0;e<n;e++)
		{
			scanf("%d",&a[i][e]);
		}
	}
	for(i=0;i<n;i++)
	{
		if(a[1][i]>=90&&a[1][i]<=100)
			b[i]=4.0;
		if(a[1][i]>=85&&a[1][i]<=89)
			b[i]=3.7;
		if(a[1][i]>=82&&a[1][i]<=84)
			b[i]=3.3;
		if(a[1][i]>=78&&a[1][i]<=81)
			b[i]=3.0;
		if(a[1][i]>=75&&a[1][i]<=77)
			b[i]=2.7;
		if(a[1][i]>=72&&a[1][i]<=74)
			b[i]=2.3;
		if(a[1][i]>=68&&a[1][i]<=71)
			b[i]=2.0;
		if(a[1][i]>=64&&a[1][i]<=67)
			b[i]=1.5;
		if(a[1][i]>=60&&a[1][i]<=63)
			b[i]=1.0;
		if(a[1][i]<60)
			b[i]=0;
	}
	for(i=0;i<n;i++)
	{
		sum1+=a[0][i];
		sum2+=b[i]*a[0][i];
	}
	printf("%.2lf",sum2/sum1);
	return 0;
}