Given integer x between 1 and 50, return integer y=mystery(x), where:
mystery(1) = 111 mystery(6) = 809 … mystery(46) = 1809
mystery(2) = 301 mystery(7) = 2120 … mystery(47) = 1319
mystery(3) = 315 mystery(8) = 1413 … mystery(48) = 1201
mystery(4) = 2301 mystery(9) = 1422 … mystery(49) = 405
mystery(5) = 2325 mystery(10) = 1320 … mystery(50) = 612
The rest are for you to determine. I just want to find values of mystery(x),where 1<=x<=50
Hint: this is not really a mathematical problem–the answer will be just a lookup table.
please provide the logic. this is not a homework problem(neither a live contest)