No.3035 Reversing Only the Letters
問題文最終更新日: 2025-02-09 01:36:10
English (AI translation)
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 458
(順位表)
の他の問題:
Problem Statement
You are given a string $S$ formed by concatenating, in this order, a string $A$ consisting only of lowercase English letters and a string $B$ consisting only of digits.
Output the string $T$ obtained by reversing only the string $A$ while leaving $B$ as it is.
Constraints
$・4\le|S|\le100$
$・$It is guaranteed that the strings $A$ and $B$ each have at least $2$ characters.
Input
The input is given from standard input in the following format.$S$
Output
Output the string $T$.
Print a newline at the end.
Sample
Sample 1
Input
eiram1234
Output
marie1234
For eiram1234, the string $A$ is eiram and the string $B$ is 1234.
Reversing the string $A$ gives marie, so $T$ is marie1234.
Note that the string $B$ is not reversed.
Sample 2
Input
abc352
Output
cba352
Sample 3
Input
happynewyear2025
Output
raeywenyppah2025
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
nauclhlt
naniwazu