the kbeauty integer num define number substring num read string meet follow conditionsIt length kit divisor numGiven integer num k return kbeauty numNoteLeading zero allowed0 divisor valueA substre contiguous sequence character string Example 1input num 240 k 2output 2explanation the follow substring num length k 24 240 24 divisor 240 40 240 40 divisor 240therefore kbeauty 2example 2input num 430043 k 2output 2explanation the follow substring num length k 43 430043 43 divisor 430043 30 430043 30 divisor 430043 00 430043 0 divisor 430043 04 430043 4 divisor 430043 43 430043 43 divisor 430043therefore kbeauty 2 Constraints1 num 1091 k numlength take num string