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
Arika Saputro: 2013-02-26 08:10:20

i think it's not logic, but imagination ;D

Pranay: 2013-02-25 16:34:21

unable to get why answer for 124 is 0208100 ..can only think of 020801 as per other test cases

Arjit Srivastava: 2013-02-25 08:46:51

What will be the output for 127? Also, someone with more concrete examples? Also, the author, can you check what's wrong with my solution? As far as I know, it is working for possibly every single test case, and terminating, too. Er?

Eduardo Nunes: 2013-02-24 18:08:23

my code returns 021681 for 128 and 160281 for 821... but i still get WA... is my logic right?

figield: 2013-02-24 15:14:12

More examples, please. What should be return for 128 or 821.

Jakub Gonzales deSousa Ropuszewicz: 2013-02-24 14:24:59

What is the correct answer for 128 ?

yupp: 2013-02-24 13:01:45

more test case !!!!

Francky: 2013-02-24 10:12:39

Answer for 124 should be 0204010 or 020401, but not 0204100, isn't it ? Maybe I'm wrong with my logic !?
EDIT : Got AC, my logic was wrong, I found why answer is well 0204100.

Last edit: 2013-02-24 10:29:47
Mitch Schwartz: 2013-02-24 06:44:36

I'd prefer to see such problems on http://www.spoj.com/GUESS/ and not on the main site.

Alex Anderson: 2013-02-24 04:10:22

This isn't a coding problem.


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