Ad
  • Default User Avatar

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

  • Custom User Avatar

    Your solution has a bug and times out for example for following input: n=1875016745ull. It's not a kata issue.

    EDIT: doh, too late.

  • Custom User Avatar

    Your code times out with tests like this:

        cr_assert_eq(digital_root(1884374416) , 1, "Expected %d, instead got %d" , 1 , digital_root(1884374416));
    

    Not a kata issue.

    Add #include <stdio.h> at the start and fflush(stdout); after your print line to see the input that makes your code fail.