#include <stdio.h>
#include <string.h>
int main()
{
char buf[100], *name[] = {"Thymine", "Cytosine", "Adenine", "Guanine"}, sname[] = "tcag", *p;
int i, cnt[4] = {0};
for (i = 0; buf[i]; ++i)
{
if (p)++cnt[p - sname];
}
for (i = 0; i < 4; ++i)
printf("%s (%c) : %d\n", name
[i
], sname
[i
], cnt
[i
]);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdHJpbmcuaD4KCmludCBtYWluKCkKewogICAgY2hhciBidWZbMTAwXSwgKm5hbWVbXSA9IHsiVGh5bWluZSIsICJDeXRvc2luZSIsICJBZGVuaW5lIiwgIkd1YW5pbmUifSwgc25hbWVbXSA9ICJ0Y2FnIiwgKnA7CiAgICBpbnQgaSwgY250WzRdID0gezB9OwoKICAgIHNjYW5mKCIlcyIsIGJ1Zik7CiAgICBmb3IgKGkgPSAwOyBidWZbaV07ICsraSkKICAgIHsKICAgICAgICBwID0gc3RyY2hyKHNuYW1lLCBidWZbaV0pOwogICAgICAgIGlmIChwKSsrY250W3AgLSBzbmFtZV07CiAgICB9CiAgICBmb3IgKGkgPSAwOyBpIDwgNDsgKytpKQogICAgICAgIHByaW50ZigiJXMgKCVjKSA6ICVkXG4iLCBuYW1lW2ldLCBzbmFtZVtpXSwgY250W2ldKTsKICAgIAogICAgcmV0dXJuIDA7Cn0=