Ad
  • Custom User Avatar

    I found more complexed pattern. Unfortunately, it passed only these initial 5 test cases, no further. Such a shame and loss of time. What could be the chances for that. So...

    If the number has even number of digits:

    3479283469 => 34792 | 83469 => sum A | sum B => sum B - sum A => 30 - 25 => 5

    123321 => 123 | 321 => sum A | sum B => sum B - sum A => 6 - 6 => 0

    If the number has odd number of digits:

    90783 => 9 | 0783 => count of digits smaller than first digit => 4

    300 => 3 | 00 => count of digits smaller than first digit => 2

    89282350306 => 8 | 9282350306 => count of digits smaller than first digit => 8