Ad
  • Default User Avatar

    That's one of the problems of this kata you need to solve! :)
    Instead of putting n1 ** n2, try to simplify those numbers.

    In fact, look at the last digits of different exponent degrees. See if there is a pattern

  • Default User Avatar

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

  • Default User Avatar

    Oh ok. I see thank you. I'm a few months into coding but new to the site, so I didn't know test cases change. I'm going to review my code now.

  • Custom User Avatar
    1. this is not a flaw in the kata. your code fails for some cases that are generated randomly (e.g., n=228)
    2. there are other simple solutions that do not need pow or ** (hint: squaring is nothing but simple multiplication)
    3. seeing that you are fairly new to the site firstly, welcome!, and secondly, you can first try out problems with a difficulty of 7/8 kyu. and then as you get more familiar with the language and how the site generally works, you can move on to more

    p.s., this is not a kata issue. issues are bugs in the kata's code. you can mark this as a question next time

    EDIT:Spellings

  • Default User Avatar

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