๋ฐ์ํ
๐ค๋ฌธ์ ํด๊ฒฐ
-
lv3 | ๋ฌธ์์ด
๐ป์์ค ์ฝ๋
for tc in range(int(input())):
word = input()
answer = ''
for i in range(len(word) - 1, -1, -1):
if word[i] == 'b':
answer += 'd'
elif word[i] == 'd':
answer += 'b'
elif word[i] == 'p':
answer += 'q'
else:
answer += 'p'
print(f'#{tc + 1} {answer}')
๐๋ฌธ์ ํ์ธ
์ถ์ฒ: SW Expert Academy
๋ฐ์ํ
'Algorithm Problem > Python' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[python] ๋ฐฑ์ค - 16916. ๋ถ๋ถ ๋ฌธ์์ด (0) | 2020.11.03 |
---|---|
[python] SWEA - 10912. ์ธ๋ก์ด ๋ฌธ์ (0) | 2020.11.02 |
[python] ๋ฐฑ์ค - 1012. ์ ๊ธฐ๋ ๋ฐฐ์ถ (0) | 2020.10.31 |
[python] ๋ฐฑ์ค - 14719. ๋น๋ฌผ (0) | 2020.10.30 |
[python] ๋ฐฑ์ค - 12865. ํ๋ฒํ ๋ฐฐ๋ญ (0) | 2020.10.29 |