Cody

Problem 44669. Dial Up

Solution 2068766

Submitted on 25 Dec 2019
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   Fail
inp = '1FUNDOG4YOU'; out_correct = 13863644968; assert(isequal(dial(inp),out_correct))

out = '1FUNDOG4YOU' out = '13UN3OG4YOU' out = '13UN3O44YOU' out = '13UN3O44YOU' out = '13U63644Y6U' out = '13U63644Y6U' out = '13863644Y68' out = '13863644968' a = []

Assertion failed.

2   Pass
inp = '1 (FUN) DOG-4-YOU #2'; out_correct = 0; assert(isequal(dial(inp),out_correct))

out = '1 (FUN) DOG-4-YOU #2' out = '1 (3UN) 3OG-4-YOU #2' out = '1 (3UN) 3O4-4-YOU #2' out = '1 (3UN) 3O4-4-YOU #2' out = '1 (3U6) 364-4-Y6U #2' out = '1 (3U6) 364-4-Y6U #2' out = '1 (386) 364-4-Y68 #2' out = '1 (386) 364-4-968 #2' a = 2 8 18 out = 0