102360: [AtCoder]ABC236 A - chukodai

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Score : $100$ points

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 $2 \leq |S| \leq 10$.
  • $1 \leq a < b \leq |S|$
  • $a$ and $b$ are integers.

Input

Input is given from Standard Input in the following format:

$S$
$a$ $b$

Output

Print the answer.


Sample Input 1

chokudai
3 5

Sample Output 1

chukodai

After swapping the $3$-rd character o and $5$-th character u of chokudai, we have chukodai.


Sample Input 2

aa
1 2

Sample Output 2

aa

In this sample, after swapping the $1$-st and $2$-nd characters of $S$, we have the same string as $S$.


Sample Input 3

aaaabbbb
1 8

Sample Output 3

baaabbba

Input

题意翻译

# 输入格式 输入一个字符串 $S(2\le|S|\le10)$和两个正整数 $a,b(1\le a,b\le|s|)$。 # 输出格式 将这个字符串的第 $a$ 和第 $b$ 个字符调换后输出。 **记得换行!!**

Output

分数:100分

问题描述

给你一个由小写英文字母组成的字符串$S$。

交换$S$的从开始的第$a$个字符和第$b$个字符,并打印交换后的字符串。

约束条件

  • $S$是由小写英文字母组成的字符串。
  • $S$的长度$|S|$满足$2 \leq |S| \leq 10$。
  • $1 \leq a < b \leq |S|$
  • $a$和$b$是整数。

输入

输入格式如下:

$S$
$a$ $b$

输出

打印答案。


样例输入1

chokudai
3 5

样例输出1

chukodai

在交换了chokudai的第$3$个字符o和第$5$个字符u之后,我们得到了chukodai


样例输入2

aa
1 2

样例输出2

aa

在这个样例中,在交换了$S$的第$1$个和第$2$个字符之后,我们得到了与$S$相同的字符串。


样例输入3

aaaabbbb
1 8

样例输出3

baaabbba

加入题单

算法标签: