(https://leetcode-cn.com/problems/greatest-common-divisor-of-strings/solution/zi-fu-chuan-de-zui-da-gong-yin-zi-by-leetcode-solu/有详细的说明) AC代码: classSolution {public:stringgcdOfStrings(stringstr1,stringstr2) {if(str1 + str2 != str2 + str1)return"";returnstr1.substr(0, __...
leetcode1 two_sum ... LeetCode1071. 字符串的最大公因子 https://leetcode-cn.com/problems/greatest-common-divisor-of-strings/ 题目 对于字符串 S 和 T,只有在 S = T + ... + T(T 与自身连接 1 次或多次)时,我们才认定 “T 能除尽 S”。 返回最长字符串 X,要求满足 X 能除尽... Mo...