#2. 移除字符串指定索引字符

移除字符串指定索引字符

Remove Character at Index N

Background

This problem tests basic string manipulation.

Problem Description

Given a non-empty string and an integer nn, return a new string where the character at index nn has been removed. The value of nn will be a valid index of a character in the original string (i.e., nn will be in the range 00 to str.length()-1 inclusive).

Input Format

Input is given from standard input in the following format.

s n

Output Format

Output is printed to standard output in the following format.

result_s

Sample

kitten"
1
ktten"
kitten"
0
itten"
kitten"
4
kittn"

Sample Explanation

In the first sample, the string is kitten". After removing the character 'i' at index 11, we get ktten". In the second sample, the string is kitten". After removing the character 'k' at index 00, we get itten". In the third sample, the string is kitten". After removing the character 'e' at index 44, we get kittn".

Constraints

Time limit: 11 second, Memory limit: 10241024 KiB for each test case.