/**
* @param {number} num
* @param {number} k
* @return {number}
*/
var divisorSubstrings = function(num, k) {
let strNum = num.toString();
let beautyCount = 0;
for (let i = 0; i < strNum.length; i++) {
let divisor = strNum.substring(i, k + i);
if (divisor.length === k && num % parseInt(divisor) === 0) {
beautyCount++;
}
}
return beautyCount;
};
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)