include[HTML_REMOVED]
using namespace std;
int main(){
int n,num,i,c=0,r=0,f=0,s=0;
char ch;
cin>>n;
for(i=0;i[HTML_REMOVED]>num>>ch;
if(ch==’C’) c+=num;
else if(ch==’R’) r+=num;
else if(ch==’F’) f+=num;
s+=num;
}
printf(“Total: %d animals\n”,s);
printf(“Total coneys: %d\nTotal rats: %d\n”,c,r);
printf(“Total frogs: %d\n”,f);
printf(“Percentage of coneys: %.2lf %%\n”,c100.0/s);
printf(“Percentage of rats: %.2lf %%\n”,r100.0/s);
printf(“Percentage of frogs: %.2lf %%\n”,f*100.0/s);
return 0;
}