#C8557. Remove and Reverse
Remove and Reverse
Remove and Reverse
You are given a string consisting of lowercase letters. Your task is to remove all occurrences of the letter \(a\) and then reverse the order of the remaining characters.
For example, if the input string is abcde
, after removing the letter \(a\), the string becomes bcde
. Reversing it gives edcb
.
This problem tests your ability to perform string manipulation with filtering and reversing operations. Solve the problem using efficient methods.
inputFormat
The input consists of a single line containing a string (s) (which may include only lowercase letters).
outputFormat
Output the resultant string after removing all occurrences of the character (a) from (s) and then reversing the order of the remaining letters.## sample
abcde
edcb