题解 | #DNA序列#

DNA序列

http://www.nowcoder.com/practice/e8480ed7501640709354db1cc4ffd42a

tes=input()
n=int(input())
c=0
t=''
for i in range(len(tes)-n+1):
    a=tes[i:i+n]
    b=0
    for s in range(n):
        if a[s]=='G' or a[s]=='C':
            b+=1
    if b>c:
        c=b
        t=a
print(t)    
    
全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务