#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    4
    Rep Power
    0

    Post Extract one number from other


    433827 has been extracted from 9423549 number. i dont know which algorithm has been used on it. please somebody help me and tell me how 433827 has bee extracted from 9423549. please.
  2. #2
  3. Transforming Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,122
    Rep Power
    9398
    Well, could be
    Code:
    if input == 9423549 {
        output = 433827
    }
    or
    Code:
    output = input - 8989722
    or
    Code:
    output = (input - 313182) / 21
    or
    Code:
    output = string(input[1], input[3], input[3], input[0] - 1, input[2], input [6] - 2)
    or
    Code:
    output = reverse(reverse(input) - 8724915)
    or
    Code:
    output = string(min(input[0], input[1]), (input[1] + input[2]) / 2, max(input[2], input[3]), input[3] + input[4], 2 * (input[4] - input[5]), input[6] - input[5] / 2)
    or even
    Code:
    output = 433827

    Comments on this post

    • saifullahiitkus agrees : thanks bro
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    4
    Rep Power
    0
    Originally Posted by requinix
    Well, could be
    Code:
    if input == 9423549 {
        output = 433827
    }
    or
    Code:
    output = input - 8989722
    or
    Code:
    output = (input - 313182) / 21
    or
    Code:
    output = string(input[1], input[3], input[3], input[0] - 1, input[2], input [6] - 2)
    or
    Code:
    output = reverse(reverse(input) - 8724915)
    or
    Code:
    output = string(min(input[0], input[1]), (input[1] + input[2]) / 2, max(input[2], input[3]), input[3] + input[4], 2 * (input[4] - input[5]), input[6] - input[5] / 2)
    or even
    Code:
    output = 433827
    Thanks. i did'nt get it. the out put is 433827 and the input is 9423549. the question which method has used to get such an out put
  6. #4
  7. Contributed User
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jun 2005
    Posts
    4,392
    Rep Power
    1871
    Originally Posted by saifullahiitkus
    Thanks. i did'nt get it. the out put is 433827 and the input is 9423549. the question which method has used to get such an out put
    You need to post a few more examples.

    I mean, if I asked how to get from "A" to "B", what would you (or anyone guess)?

    But if I asked "A" to "B", "B" to "C", "C" to "D", "D" to "E", we all might figure out the pattern that would reasonably allow us to guess what "S" would translate to.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper

IMN logo majestic logo threadwatch logo seochat tools logo