Code the message
All submissions for this problem are available.
Aadil wants to code a message for his girlfriend so he wants your help.
Replace every character by its position in alphabet sequence to the power 2, separate every alphabet in a word by '-' symbol and separate every word in a sentence by '$'.
The position of string is 0 index based.All the alphabets will be in small letters.
- The first line of the input contains an integer T denoting the number of test cases. The description of T test cases follows.
- Each test case contain a single string i-e message to be coded
- For each test case, output a single line containing the string i.e CodedMessage
- 1 ≤T≤100
- 1 ≤ |message| ≤10^5
1 abcde fgh ijkl Output: 0-1-4-9-16$25-36-49$64-81-100-121
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
Fetching successful submissions