题解 | #DNA序列#

DNA序列

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

while True:
try:
s=str(input())
n=int(input())
i=0
c_max=''
GCcount=0
index=0
while i+n<=len(s):
if s[i:i+n].count('G')+s[i:i+n].count('C')> GCcount:
index=i
c_max=s[index:index+n]
GCcount=c_max.count('G')+c_max.count('C')
i+=1
print(c_max)
except:
break

全部评论

相关推荐

求个付费实习岗位:这种就是吃满时代红利又没啥技术水平,只能靠压力学生彰显优越感的老登,别太在意了
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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