• + 0 comments

    Did not understand why my code passed only first 2 testcases and failed all the rest until I realized that the modulo code was not in the right place.

    If you comment your modulo code and it passes the testcases below when n<12 but will fail as soon as n=12 , then your code is very close to the solution.

    10 10 2 38742049

    11 10 2 348678440

    12 10 2 138105940