<commit_before>package leetcode

/**
 * https://leetcode.com/problems/find-the-k-beauty-of-a-number/
 */
class Problem2269 {
    fun divisorSubstrings(num: Int, k: Int): Int {
        TODO()
    }
}

fun main() {
    val prob = Problem2269()
    println(prob.divisorSubstrings(240, 2)) // 2
    println(prob.divisorSubstrings(430043, 2)) // 2
}<commit_msg>Solve problem 2269<commit_after>package leetcode

/**
 * https://leetcode.com/problems/find-the-k-beauty-of-a-number/
 */
class Problem2269 {
    fun divisorSubstrings(num: Int, k: Int): Int {
        var answer = 0
        val s = num.toString()
        var i = 0
        while (i + k <= s.length) {
            val n = s.substring(i, i + k).toInt()
            if (n != 0 && num % n == 0) {
                answer++
            }
            i++
        }
        return answer
    }
}
{'fraction_non_alphanumeric': 0.1506524317912218, 'fraction_numerical': 0.03914590747330961, 'mean_word_length': 1.910344827586207, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7136412', 'n_tokens_mistral': 326, 'n_tokens_neox': 293, 'n_words': 64}