Problem 393. You LOVES Matlab 41%
Given two strings, determine the percentage that one loves the other in the following way:
YOU LOVES MATLAB
there is 1 'L', 1 'O', and 0 of 'V', 'E' and 'S' for the string 'YOUMATLAB' giving 11000. You must add the adjacent digits until you get a two digit 'percentage' as an answer. (if the sum is over 9, add those digits in the next sequence.) 11000>2100>310>41% (the % need not be in the output)
I found this game in an old journal written by a friend when she was 6 years old, testing the compatibility of her older sister with boys in her class.
Solution Stats
Problem Comments
-
5 Comments
agreed, i think 'humankind loves dinosaurs' should be 33
Sorry about that. I updated the rules and changed the dinosaur thing. Thank you for point out those errors.
We must compare the frequency of the word 'LOVES' with the word concatenation upper([E,S]) if someone else finds the problem description unclear. And [9,9,9] must become [1,8,1,8], which is also not clear by the description. Notice that this would create an infinite loop, but that's the current solution for this problem.
PS: My first guess was that [9,9,9] should become [1,2,2,6] -> [3,4,1,0] -> [7,5,1]-> 1 8 %, which makes more sense than some cases generating an infinite loop.
Solution Comments
Show commentsGroup

Advent of Code
- 25 Problems
- 5 Finishers
- Calculate days until Christmas
- How many Christmas presents under the tree?
- Snow Accumulation and Structural Risks To Residential Properties
- Scrabble Scores
- The twelve days of Christmas
- Calculate Wind Chill Factor
- Air Mass to Star for an Observer at Mean Sea Level
- Determine when snow started
- Mechanical Advantage of a Gear Train
- Similar Triangles - find the height of the tree
- Sleeping Queens 1
- Solve the Sudoku Row
- Fractal: area and perimeter of Koch snowflake
- Calculate Amount of Cake Frosting
- The cake is a lie...
- You LOVES Matlab 41%
- Minkowski distance
- Where the Four Corners Am I?
- Most Frequent Word - 01
- Design a tubesheet for shell-and-tube heat exchangers
- Lights Out 1 - 5x5, 3 moves
- Why the heck are they blinking!?!?
- Calculate the Distance to Source of Lightning
- Radiation Heat Transfer — View Factors (1)
- How many days?!?
Problem Recent Solvers38
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!