LeetCode --- 1071. Greatest Common Divisor of Strings 解题报告

Posted 杨鑫newlfe

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了LeetCode --- 1071. Greatest Common Divisor of Strings 解题报告相关的知识,希望对你有一定的参考价值。

For two strings s and t, we say "t divides s" if and only if s = t + ... + t (i.e., t is concatenated with itself one or more times).

Given two strings str1 and str2, return the largest string x such that x divides both str1 and str2.

Example 1:

Input: str1 = "ABCABC", str2 = "ABC"
Output: "ABC"

Example 2:

Input: str1 = "ABABAB", str2 = "ABAB"
Output: "AB"

Example 3:

Input: str1 = "LEET", str2 = "CODE"
Output: ""

Constraints:</

以上是关于LeetCode --- 1071. Greatest Common Divisor of Strings 解题报告的主要内容,如果未能解决你的问题,请参考以下文章

LeetCode.1071-字符串最大公约数(Greatest Common Divisor of Strings)

Calculated padded input size per channel: (3 x 3). Kernel size: (5 x 5). Kernel size can‘t be greate

e1071 安装 R 3.1.2

Error in library(e1071) : there is no package called 'e1071'

PAT - A1071

R:调整 SVM 参数 - e1071 包中的 class.weights