You are given a string s consisting of digits from '$1'$ to '$9'$, and two integers k and minLength.
A partition of s is called beautiful if:
s is divided into exactly k contiguous, non empty substrings.
Each substring has a length of at least minLength.
The first character of each substring is a prime digit ('$2'$, '$3'$, '$5'$, or '$7'$).
The last character of each substring is a non prime digit ('$1'$, '$4'$, '$6'$, '$8'$, or '$9'$).
Return the total number of beautiful partitions of s. Since the answer may be very large, return it modulo
Constraints:
k, minLength s.length
s consists of the digits '$1'$ to '$9'$.
You are given a string s consisting of digits from '$1'$ to '$9'$, and two integers k and minLength.
A partition of s is called beautiful if:
s is divided into exactly k contiguous, non empty substrings.
Each substring has a length of at least minLength.
The first character of each substring is a prime digit ('$2'$, '$3'$, '$5'$, or '$7'$).
The last character of each substring is a non prime digit ('$1'$, '$4'$, '$6'$, '$8'$, or '$9'$).
Return the total number of beautiful partitions of s. Since the answer may be very large, return it modulo
Constraints:
k, minLength s.length
s consists of the digits '$1'$ to '$9'$.