Cody

Problem 47593. Decipher the number 3 - 10 keys

Solution 3820663

Submitted on 24 Nov 2020 by William
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
filetext = fileread('decyp.m'); assert(isempty(strfind(filetext, 'regexp')),'regexp hacks are forbidden') assert(isempty(strfind(filetext, 'if')),'if is forbidden') assert(isempty(strfind(filetext, 'while')),'while is forbidden') assert(isempty(strfind(filetext, '-')),'- is forbidden') x=num2str(20710655*13335135); y= 97256528638204; assert(isequal(decyp(x),y)); x='01215'; y=94924; assert(isequal(decyp((x)),y)); x=num2str(20435655*136345); y=1911936178599; assert(isequal(decyp(flip(x)),y)); x=num2str(0435655*1363452); y=928297415645; assert(isequal(decyp(flip(x)),y)); x='04356551363452'; y=5231324481821; assert(isequal(decyp(flip(x)),y));

Suggested Problems

More from this Author33

Community Treasure Hunt

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

Start Hunting!