while(line = readline()) { let length = 0, temp = '', reg = /[ATCG]/ for (let i = 0; i < line.length; i++) { if (reg.test(line.charAt(i)) == true) { temp += line.charAt(i) length = temp.length > length ? temp.length : length } else { temp = '' } } console.log(length) }
点赞 评论

相关推荐

我也曾抱有希望:说的好直白
点赞 评论 收藏
分享
牛客网
牛客企业服务