← All problemsSign in

2269. Find the K-Beauty of a Number

LeetCodeMathStringSliding WindowOpen on judge ↗

The k-beauty of an integer num is defined as the number of substrings of num when it is read as a string that meet the following conditions: - It has a length of k. - It is a divisor of num. Given integers num and k, return the k-beauty of num. Note: - Leading zeros are allowed. - 0 is not a divisor of any value. A substring is a contiguous sequence of characters in a string. Example 1:

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start