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
-
Back to basics 21 - Matrix replicating
1823 Solvers
-
Make a random, non-repeating vector.
11781 Solvers
-
Getting the indices from a vector
12409 Solvers
-
447 Solvers
-
特定の値がベクトル内に含まれているかを確認するコードを書こう
346 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.