Solve the Mystery


Input                        Output

2     3    2                   5  

13   14   1                  14 

14    5    9                  464

Find the logic behind the output.

Comments

  1. Logic :
    -- Individual digits in the Output will always sum to 5
    -- It would be sum of "1's" present in the previous inputs ( represented in BCD format) + what requires to make the total output sum to 5



    0000 0010 0000 0011 0000 0010 5 -- Since there was no previous input so the output is 5

    0001 0011 0001 0100 0000 0001 14 -- Sum of "1''s" in the previous input sequence is '4' so the output is (5-4) 4 = 14

    0001 0100 0000 0101 0000 1001 464 -- Sum of "1''s" in the previous two input sequence is "6" and "4" , 6+4 =10 ,
    so the output should be (5-1) 6 4 to make the total 5

    Similarly Next output should be 7664

    ReplyDelete

Post a Comment

Popular posts from this blog

Disable or enable proxy for Internet explorer or Chrome

chm viewer unable to show contents

3 prisoners and 5 hats puzzle