Problem 47593. Decipher the number 3 - 10 keys
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
		George Berken
    	on 18 May 2024
	
	
  	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.
Solution Comments
Show commentsProblem Recent Solvers11
Suggested Problems
- 
         
         23139 Solvers 
- 
         
         235 Solvers 
- 
         
         1828 Solvers 
- 
         
         319 Solvers 
- 
         generate number in particular way 112 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!