Ad
  • Custom User Avatar

    please don't say anything bout it...

  • Custom User Avatar

    for cpp at least is for sure 4kyu

  • Custom User Avatar

    In mathematics, digital sum and digital root are the same concept

    And again, nowhere it says you need to calculate the digital root or digital sum, it says the sum of its digits.

    Please, stop discussing something that's obviously in your mind, how would you describe the sum of the digits of a number? That's what it says, literally. Read better next time.

  • Custom User Avatar

    Wikipedia shouldn't be your source,
    In mathematics, digital sum and digital root are the same concept, since there is no functionality to just iterate the digits once. I wouldn't have argued with you, but you had to come with your downvote and a BS response.

  • Custom User Avatar

    The weight of a number will be from now on the sum of its digits.

    You're talking about digital root, and nowhere it tells you you have to do that here.

    For example 99 will have "weight" 18, 100 will have "weight" 1 so in the list 100 will come before 99.

    You can see the sum of the digits has two digits in the example in the description too. It's a literal sum of the digits, your mistake.

  • Custom User Avatar

    The digit sum is recursive in mathematic.
    if its over 9 you calculate the digit sum till its under 10.
    But I guess we can start calling anything to whatever we want.

  • Custom User Avatar

    1 + 2 + 3 + 4 = 10

  • Custom User Avatar

    dotest("2000 10003 1234000 44444444 9999 11 11 22 123", "11 11 2000 10003 22 123 1234000 44444444 9999");

    expected is wrong, or am i mentally delayed?
    1234000 = 1 + 2 + 3 + 4 + 0 + 0 + 0 = 1 + 0 = 1
    why do we expect it to be 5?

  • Default User Avatar

    I wrote it with c++. It has been a while since I wrote c++ or use this website.

    If anyone want to check my solution: https://www.codewars.com/kata/reviews/5d5ed826ad2c6800010db5d3/groups/627fcd97d6bf32000121cd8e
    I would love if someone has any better practices to suggest to me.

    Thanks!