| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 1024 MB | 1679 | 1415 | 1343 | 84.625% |
In the String class, there exists a function called substring. Your task is to do the opposite of the substring function. Rather than returning a specified substring within the String, you will output the String with the substring taken out.
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 out, and the substring removed extends to index j-1. Thus the length of the substring removed is j-i. You may assume that 0 ≤ i ≤ j ≤ length(string).
Output the given string, with the substring taken out specified by the given integers. The output will be n lines, with no leading or trailing white space.
3 COMPUTER 1 3 SCIENCE 3 7 RULES 3 4
CPUTER SCI RULS