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