The Most Lovely Name Medium

Challenge ends in

Before you start the test, check out our tutorial challenge

  • DATE Feb 13, 2019 - Feb 13, 2020

The Most Lovely Name

Challenge outline

Hello and welcome to the challenge!

Like every programmer in the world, Adam has a big problem today: with whom to spend Valentine's Day? He has so much girls interested in him, but he should choose only one. But fortunately, he has a simple solution: let's choose the one which has the most lovely name!

Write a code which will help Adam to choose the most lovely name from the names given. You can count loveliness of a name by summing loveliness of its letters. And we can determine loveliness of a letter by determining its position in the alphabet. If some two names have the same loveliness, choose the name which appears earliest in the original string.

Have fun and good luck! :)