https://icpcarchive.ecs.baylor.edu/external/65/6542.pdf 솔직히 이 문제 너무 쉬웠다고밖에는....... == 황현 == {{{ #include #include int main() { int T, c, x, y, i; double p; scanf("%d", &T); for (i = 0; i < T; ++i) { x = y = 0; p = .0; scanf("%d", &c); getc(stdin); switch (getc(stdin)) { case 'Y': x += 3; y += 10; case 'Z': x += 3; y += 10; case 'E': x += 3; y += 10; case 'P': x += 3; y += 10; case 'T': x += 3; y += 10; case 'G': x += 3; y += 10; case 'M': x += 3; y += 10; case 'K': x += 3; y += 10; getc(stdin); case 'B': break; } getc(stdin); y -= x; printf("Case #%d: %.2lf%%\n", i + 1, round((1.0 - (pow(5, x) / pow(2, y))) * 10000.0) / 100.0); } return 0; } }}}