Output print the value ascii ascii
SCHOOL
Sample output
To solve the problem, we need to sort the given string in decreasing lexicographic order and calculate the value of 1 * ASCII(s1) + 2 * ASCII(s2) + ... + n * ASCII(sn), where ASCII(si) is the ASCII code of the letter is.
Here's the solution in Python:


