you know Martians use number system base k Digit b 0bk consider lucky contact Martians Earthlings occur year b Martian chronologyA digital root dx number x number consist single digit result cascade sum digit number x word cascading mean sum give number consist digit sum digits digit numberFor example d35047d35047d157d157d6767 in sample calculation perform 7base notationif number digital root equal b Martians number luckyyou string s consist n digits kbase notation system your task find distinct substring give stre lucky number lead zero permit numbersnote substre si j string sa1a2 1ijn string aiai1 aj two substring si1 j1 si2 j2 string s different i1i2 j1j2