SMUPC NAME
Time limit1sMemory limit512 MB
Given a registration number and a lowercase name, the task builds a SMUPC NAME by deduplicating letters, appending a count, prepending a number, and reversing the result.
- Level
Easy2 of 10
- Topics
- String, Simulation, Implementation
- Solved
- No attempts yet
Problem
Yeonjae wants to make a SMUPC NAME for the contestants of the 4th SMUPC. The steps to make a SMUPC NAME are as follows.
- Extract letters from the contestant's English name so that no letter repeats. If a letter appears more than once, keep only its first occurrence and discard the rest.
- Append to the end of the string from step 1 the total number of discarded letters plus .
- Prepend to the string from step 2 the registration number plus .
- Reverse the string from step 3.
- Prepend "
smupc_" to the string from step 4.
For a contestant with registration number and the English name "yeonjaechoi", the SMUPC NAME is as follows.
- yeonjachi
- yeonjachi6
- 1908yeonjachi6
- 6ihcajnoey8091
- smupc_6ihcajnoey8091
Input
The first line contains an integer , the registration number, and an English name , separated by a space. contains no spaces and consists only of lowercase English letters.
Output
Print the SMUPC NAME made by the steps above.