問題一覧 > 通常問題

No.292 Stage Name

レベル : / AI推定難易度 : 111 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 661
作問者 : nmnmnmnmnmnmnm / テスター : uwi
お気に入りにしたユーザー ProblemId : 725 / 自分の提出
問題文最終更新日: 2026-06-25 10:29:09
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 124 (順位表) の他の問題:

Problem Statement

A-kun, a comedian, came up with the stage name $S$.
First, he asked Master B for an opinion and was told to delete the single character at position $t$ (0-indexed) from the beginning.
Next, he asked Master C for an opinion and was told to delete the single character at position $u$ (0-indexed) from the beginning.
A-kun decided to delete characters exactly as Master B and Master C told him.
If the opinions of Master B and Master C are the same, one character is deleted.
If the opinions of Master B and Master C are different, two characters are deleted.
Given $S$, $t$, and $u$, answer the name that results from getting the opinions of Master B and Master C.

Input

$S$ $t$ $u$

The string $S$ consists of lowercase letters.
$3 \le 文字列Sの長さ \le 50$.
$0 \le t \le 文字列Sの長さ-1$.
$0 \le u \le 文字列Sの長さ-1$.

Output

Output A-kun's resulting stage name on one line.
Print a newline at the end.

Sample

Sample 1
Input
yukicoder 0 4
Output
ukioder

The stage name A-kun first came up with is yukicoder.
First, Master B told him to delete the 0th character, y, from yukicoder.
Next, Master C told him to delete the 4th character, c, from yukicoder.
In the end, A-kun deleted y and c, and his stage name was decided to be ukioder.

Sample 2
Input
aaa 0 0
Output
aa

Both Master B and Master C told him to delete the 0th character, a.
A-kun deleted only the 0th character, a.

Sample 3
Input
nmnmnmnmnmnmnm 13 12
Output
nmnmnmnmnmnm

The last two characters are gone.

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。