• + 0 comments

    Your approach to this problem was great and one correction if d > n then in those cases you should recompute d as d = d%n;