Closed RazvanBugoi closed 4 years ago
https://www.codewars.com/kata/542c0f198e077084c0000c2e/train/javascript
function getDivisorsCnt(n){ let output = 0; for (let i=1; i<=n; i++) { if (n % i == 0) { output += 1; } } return output; }
it's obvious, but O(n) speed is too slow
https://www.codewars.com/kata/542c0f198e077084c0000c2e/train/javascript