Java Substring
School Accuracy: 55.21% Submissions: 4990 Points: 0

Given a string S and two integers L and R. Print the characters in the range L to R of the string.

NOTE: Assume zero based indexing.

Input: 
First line of input contains a single integer T, which denotes the number of testcases. T testcases follows, first line of each testcase contains a string S. Second line consists of two integers L and R.

Output: 
Corresponding to each testcase in new line, print the required output.

Constraints:
1 <= T <= 100
1 <= length(S) <= 103
1 <= L <= 800
1 <= R <= 900

Example:
Input:

2
cdbkdub
0 5
sdiblcsdbud
3 7

Output:
cdbkdu
blcsd

Explanation:
Testcase 1:
The characters from 0 to 5 of the given string: cdbkdu

to report an issue on this page.

Editorial

We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?

Yes

All Submissions

My Submissions:

Login to access your submissions.