题解 | #名字串生成II#
名字串生成II
https://www.nowcoder.com/practice/a90b0c33344e4b8488fe0b376de3205d
package main import "strings" /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param str1 string字符串 * @param str2 string字符串 * @return string字符串 */ func lcmOfStrings( str1 string , str2 string ) string { // write code here if strings.Contains(str1, str2){ return str1 }else if strings.Contains(str2, str1){ return str2 }else{ return "" } }