题解 | #DNA序列#
DNA序列
http://www.nowcoder.com/practice/e8480ed7501640709354db1cc4ffd42a
str1 = input() num = int(input()) max_str = [0,0] if len(str1)-num> 0: for i in range(len(str1)-num): son_str = str1[i:i+num] if (son_str.count('C')+son_str.count('G'))/num > max_str[0]: max_str[0] = (son_str.count('C')+son_str.count('G'))/num max_str[1] = son_str print(max_str[1]) else: print(str1)