mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-01-10 18:48:13 +08:00
38 lines
903 B
HTML
38 lines
903 B
HTML
<p>给定一个非空的字符串<meta charset="UTF-8" /> <code>s</code> ,检查是否可以通过由它的一个子串重复多次构成。</p>
|
|
|
|
<p> </p>
|
|
|
|
<p><strong>示例 1:</strong></p>
|
|
|
|
<pre>
|
|
<strong>输入:</strong> s = "abab"
|
|
<strong>输出:</strong> true
|
|
<strong>解释:</strong> 可由子串 "ab" 重复两次构成。
|
|
</pre>
|
|
|
|
<p><strong>示例 2:</strong></p>
|
|
|
|
<pre>
|
|
<strong>输入:</strong> s = "aba"
|
|
<strong>输出:</strong> false
|
|
</pre>
|
|
|
|
<p><strong>示例 3:</strong></p>
|
|
|
|
<pre>
|
|
<strong>输入:</strong> s = "abcabcabcabc"
|
|
<strong>输出:</strong> true
|
|
<strong>解释:</strong> 可由子串 "abc" 重复四次构成。 (或子串 "abcabc" 重复两次构成。)
|
|
</pre>
|
|
|
|
<p> </p>
|
|
|
|
<p><b>提示:</b></p>
|
|
|
|
<p><meta charset="UTF-8" /></p>
|
|
|
|
<ul>
|
|
<li><code>1 <= s.length <= 10<sup>4</sup></code></li>
|
|
<li><code>s</code> 由小写英文字母组成</li>
|
|
</ul>
|