Ad
  • Custom User Avatar

    Sample from task is working:

    Letter: m | 12 * 6015 % 26 = 4 == e

    Letter: e | 4 * 6015 % 26 = 10 == k

    Letter: r | 17 * 6015 % 26 = 23 == x

    But trying five letters from first test:

    request = "1273409kuqhkoynvvknsdwljantzkpnmfgf" and answer must be "uogbucwnddunktsjfanzlurnyxmx"

    Letter: k | 10 * 1273409 % 26 = 18 == s

    Letter: u | 20 * 1273409 % 26 = 10 == k

    Letter: q | 16 * 1273409 % 26 = 8 == i

    Letter: h | 7 * 1273409 % 26 = 23 == x

    Letter: k | 10 * 1273409 % 26 = 18 == s

    None of the letters match. Maybe I didn't understand the task?

  • Default User Avatar
  • Default User Avatar

    Spent an hour on this, really good one

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Try to read the error message. Base in this kata can be any vaue higher than 1. Also higher than 36 :) or lower than base-2: unary

  • Custom User Avatar

    i hate this kata

    "RangeError: toString() radix argument must be between 2 and 36
    at Number.toString ()
    at reverseNumber (test.js:6:18)
    at doTest (test.js:18:24)
    at Array.forEach ()
    at Context. (test.js:22:82)
    at process.processImmediate (node:internal/timers:471:21)"

    although in vs code it works as it should