Typo Man Go Changyoung
InterviewTime limit1sMemory limit128 MB
Given a string and a 1-based position, output the string with that one character removed, for multiple test cases.
- Level
Easy1 of 10
- Topics
- String, Implementation
- Solved
- No attempts yet
Problem
Changyoung always makes exactly one typo when typing a string. Given the typed string and the position of the wrong character, output the string after removing that one character.
Input
The first line contains the number of test cases T (1 <= T <= 1,000).
Each test case is given on one line as an integer P and a string S. P is the 1-based position of the wrong character, and S is the string Changyoung typed. The length of S is at most 80, S contains only uppercase English letters, and P is at most the length of S.
Output
For each test case, output on one line the string after removing the wrong character.