CODR - LOGIC

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

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

hide comments
2013-03-03 16:11:57 raunakrocks
WA again n again more test cases plz..
2013-03-03 07:25:25 Jai Reddy
What would be answer if we have 0 in tens place? Is it 000000. Could someone reply who got AC
2013-03-25 15:29:51 Alex Anderson
Since people seem confused about why this problem is not a good problem, I'll explain: it isn't well defined. A well defined problem is one where anything which satisfies the problem constraints is a valid solution. Here, the only constraints are te input output sets. There are a lot of solutions which fit the givens, yet only one of the many correct solutions are accepted, which makes the problem not well defined. It certainly is a "problem" but again, not the kind that is worth having in classical spoj.
2013-03-03 02:59:36 _maverick
wow finally got AC after 3 wrng attempts!
For all those who r trying this one
the LOGIC is NOT exactly what u see in the first place..
and for 128 the output would be <. snip .> :!
a good problem that made me think well
(edit) No other test cases are provided. Please, see notes below.

Last edit: 2013-03-10 22:54:11
2013-03-02 21:54:52 :D
Yes, I'm not a big fan of such problems myself. I requested from SPOJ admins to make a separate "riddles" category. Then I will be moving problems like this.
2013-03-02 13:40:35 Ankit Chaudhary
what is ans for 525?
Is it <. snip .>?
(edit) No other test cases are provided. Please, see notes below.

Last edit: 2013-03-10 22:54:48
2013-03-01 20:52:37 nani


Last edit: 2014-01-22 16:34:37
2013-02-27 22:59:42 Alex Anderson
Why is this problem still in classical? This problem is beyond inane. Might as well have just made it "Guess my favorite number" - it would be just as useful for practice.

Last edit: 2013-02-27 23:20:46
2013-02-27 20:06:10 Eduardo Nunes
im still getting WA, but i think to 525 output should be <. snip .>, isnt it?
(edit) No other test cases are provided. Please, see notes below.

Last edit: 2013-03-10 22:55:15
2013-02-27 14:55:17 Runtime Error
ans for 525?
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.