CODR - LOGIC

no tags 

Mr.X  has recently graduated from his university.He was called for an interview by a company Y.In the coding round the company asked from Mr.X to decrypt a set of 3 digit numbers using some algorithm.Mr.X does not have very good programming skills,but he knows you as a friend and a talented programmer.Help Mr.X to get selected for the job.

Input

Each line of input consists of a 3 digit number. Inputs are terminated when 0 is encounterred.

Output

Ouput consists of a decrypted number for each input number.

Example

Input:
999
111
124
987
0
 Output:

8181261 010120 0208100 7256821

hide comments
Bánkeszi Ádám: 2017-12-04 23:47:08

When decoding the last output digits just forget your input... Hope it helps!

faizainun: 2016-10-22 07:42:05

the key is the solution for 124, if it is correct, make sure your program correct for input = 098, 097, 000, etc.

Last edit: 2016-10-22 07:43:34
DEVVRAT GUPTA: 2015-12-18 20:44:40

focus on solution for 124 and code this question only if you can decode the correct ans i.e. 0208100 for 124
rest is easy.

---@@@----: 2015-05-14 09:46:52

Got 6 WA's...
still waiting for AC....!!
question sucks...!!!!!! :(
atleast provide output for 128

beginner: 2015-02-14 23:26:40

Last edit: 2015-02-19 01:34:41
xxxx: 2013-03-15 04:42:45

sorry *right

xxxx: 2013-03-15 04:42:22

is third output write
i think it will be 0208010

Nnavneetsinha: 2013-03-11 16:16:34

this is not coding this is imagination . to make it a coding problem pls add some test cases , otherwise there is no use of such problem.

raunakrocks: 2013-03-03 16:11:57

WA again n again more test cases plz..


Added by:Abhishek Tiwari
Date:2013-02-24
Time limit:0.5s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64
Resource:own problem