notebook.community
Edit and run
https://github.com/prabodhprakash/problemsolving/blob/master/spoj/DISUBSTR.cpp - look here for solution, was getting TLE in python