Cody

Problem 1271. THE CALCULATOR OF LOVE

Solution 552257

Submitted on 5 Jan 2015 by Pritesh Shah
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
%% assert(love_calculator('Jay-Z','Beyonce')==5)

ans = -BJZacenoy ans = 5

2   Pass
%% assert(love_calculator('Dr. Dre','Eminem')==47)

ans = .DEeimnr ans = 47

3   Pass
%% assert(love_calculator('Angelina Jolie','Brad Pitt')==69)

ans = ABJPadegilnort ans = 69

4   Pass
%% assert(love_calculator('Jennifer Aniston','Brad Pitt')==75)

ans = ABJPadefinorst ans = 75

5   Pass
%% assert(love_calculator('God','Satan')==82)

ans = GSadnot ans = 82

6   Pass
%% assert(love_calculator('Your Mom','Your Dad')==5)

ans = DMYadmoru ans = 5

7   Pass
%% assert(love_calculator('@bmtran','MATLAB')==66)

ans = @ABLMTabmnrt ans = 66

Suggested Problems

More from this Author56

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!