You will be given a input number (eg) x='1233'
input will be char.
you have to figure out the dechiper keys and match it with given input and decipher it
eg x=1233
ref=[0 1 2 3 4 5 6 7 8 9 ]; decipher_key_1=[ 1 2 3 4 5 6 7 8 9 0] ;decipher_key_2=[ 3 4 5 6 7 8 9 0 1 2];
decipher_key_3=[ 2 3 4 5 6 7 8 9 0 1];decipher_key_4=[ 2 3 4 5 6 7 8 9 0 1];
---> These are not real keys , just an example
output y=2555
Hint : index : 1-> key 1
2> key 2
3 -> key 3
4-> key 4
5_> key 5
upto key 10 .............................
if the number of digits exceeds 10 , 11 th digit must have the 1st key and 2nd key for 12th and so on.
"If" and "while" are forbidden
Solution Stats
Problem Comments
1 Comment
Solution Comments
Show comments
Loading...
Problem Recent Solvers12
Suggested Problems
-
Remove the small words from a list of words.
1566 Solvers
-
Project Euler: Problem 16, Sums of Digits of Powers of Two
181 Solvers
-
Set the array elements whose value is 13 to 0
1448 Solvers
-
349 Solvers
-
1104 Solvers
More from this Author33
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
Thanks Sibi for the problem.
Even though it was frustrating at times I learned a few things.
Note: The most difficult parts to this problem are:
1. For a couple of the tests don't forget to insert a leading '0'.
2. Be aware that for some of the tests the 'x' variable is flipped when the function is called.