I am looking at Leetcode problem 459:
459. Repeated Substring Pattern
Given a non-empty string check if it can be constructed by taking a substring of it and appending multiple copies of the substring together. You may assume the given string consists of lowercase English letters only and its length will not exceed 10000.
Let N be the string length, L be the length of the longest proper suffix of the string, if L is not 0, and N%(N-L) is zero, then s.substr(0, N-L) is the repeating compositional substring. I understand this statement. However, I can't figure out the opposite direction, i.e., if the string is made of repeating compositional substring, assuming its shortest length is K, then the length of the longest proper suffix of the string is N-K. Can someone kindly provide a generic proof for it?