include [HTML_REMOVED]
using namespace std;
int n;
double a[100],total=0.0;
double vc=0.0,vr=0.0,vf=0.0,c=0.0,r=0.0,f=0.0;
char b[100];
int main()
{
cin>>n;
for(int i=0; i[HTML_REMOVED]>a[i]>>b[i];
total=total+a[i];
if(b[i]==’C’)
c=c+a[i];
else if(b[i]==’R’)
r=r+a[i];
else if(b[i]==’F’)
f=f+a[i];
}
printf(“Total: %.0f animals\nTotal coneys: %.0f\nTotal rats: %.0f\nTotal frogs: %.0f\n”,total,c,r,f);
vc=c/(c+r+f);
vr=r/(c+r+f);
vf=f/(c+r+f);
printf(“Percentage of coneys: %.2f %\nPercentage of rats: %.2f %\nPercentage of frogs: %.2f %\n”,vc100,vr100,vf*100);
}