Ad
  • Custom User Avatar

    Solution, which takes 4 second for 10^8 will not pass I believe. It's pretty slow. Time limit on Codewars as far as I know is 6 seconds and the largest value in this kata is 10^9, so your solution will work about 30 second to resolve it. That's why you see timeout exception.