题解 | #DNA序列#
DNA序列
https://www.nowcoder.com/practice/e8480ed7501640709354db1cc4ffd42a
DNA = input()
N = int(input())
DNA_list = [
DNA[i : i + N] for i in range(0, len(DNA))]
GC_list = []
for k in DNA_list:
x = k.count("C")
y = k.count("G")
GC_list.append(x + y)
max_gc = max(GC_list)
n = GC_list.index(max_gc)
print(DNA_list[n])
#悬赏#