Harry Potter is again trying to solve a new challenge from Dumbledore. He must discover the secret code inside the spell list. To do this, he must sum the number of letters in the spells that start with the same letter. What is the code?
Grouping collections
The secret is inside the spell?
Report a typo
Sample Input 1:
expetum patronus axio elithigum padriketomSample Output 1:
{e=16, p=18, a=4}Write a program in Kotlin
/* Do not change code below */
fun main() {
val list = readln().split(" ")
// write your code here
val res =
println(res)
}
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.