PS/Baekjoon Online Judge
[백준 26546] Reverse [Python]
kimyoungrok
2023. 5. 31. 12:51
728x90
풀이
주어진 문자열과 i, j에 대해 i ~ (j - 1) 구간의 부분 문자열을 제외한 나머지 문자열을 출력해주면 되는 문제다.
i <= j 이기에 i == j 일 경우 (j - 1) < i 가 되기에 정답이 달라질 수 있지만, 문제없이 풀린다. TC 부족인가?
소스코드
출처
26546번: Reverse
The first line will contain a single integer n that indicates the number of data sets that follow. Each data set will be one line with a string and two integers i and j, separated by spaces. The first int, i, is the start index of the substring to be taken
www.acmicpc.net
728x90