Python으로 구현한 18787번 Mad Scientist 문제 풀이입니다. https://www.acmicpc.net/problem/18787 18787번: Mad Scientist First, FJ can transform the substring that corresponds to the first character alone, transforming $B$ into GHGGGHH. Next, he can transform the substring consisting of the third and fourth characters, giving $A$. Of course, there are other combinations of t www.acmicpc.net n = int(input()) a = ..