Ad
  • Custom User Avatar

    Print the input value. Your code is failing when n=195, 6 is the expected answer, but your code is returning 15. 15 is 2 digits and the answer always has to be a single digit.

  • Default User Avatar

    I solved it in Javascript and it passes the tests. However, when I try to submit, I receive this error:

    ReferenceError: digital_root is not defined
    at Object.handleError
    at ContextifyScript.Script.runInThisContext
    at Object.exports.runInThisContext