Problem Statement
You are given a string S consisting of lowercase English letters. Swap the a-th and b-th characters from the beginning of S and print the resulting string.
Constraints
- S is a string consisting of lowercase English letters.
- The length of S, ∣S∣, satisfies
- 1≤a<b≤∣S∣
- a and b are integers.
Standard input and output
Input: a string S and two integers which called a, b;
output: The result string
题目翻译
给你字符串,交换第a个与第b个,很简单的一个问题。注意c++下标从0开始,而样例从1开始。交换用.
下面为题解样例程序: