2950. Number of Divisible Substrings
Each character of the English alphabet has been mapped to a digit as shown below.
A string is divisible if the sum of the mapped values of its characters is divisible by its length.
Given a string
s
, return the number of divisible substrings ofs
.A substring is a contiguous non-empty sequence of characters within a string.
1 | class Solution { |