PS/Baekjoon Online Judge

[백준 06438] Reverse Text [Python]

kimyoungrok 2024. 7. 26. 22:54
728x90

문제

In most languages, text is written from left to right. However, there are other languages where text is read and written from right to left. As a first step towards a program that automatically translates from a left-to-right language into a right-to-left language and back, you are to write a program that changes the direction of a given text.

입력

The input file contains several test cases. The first line contains an integer specifying the number of test cases in the file. Each test case consists of a single line of text which contains at most 70 characters. However, the newline character at the end of each line is not considered to be part of the line.

출력

For each test case, print a line containing the characters of the input line in reverse order.


풀이

입력받은 N개의 문자열을 뒤집어 출력하면 된다.


소스코드

보기


출처

https://www.acmicpc.net/problem/6438

728x90