摘要:
Task description A DNA sequence can be represented as a string consisting of the letters A, C, G and T, which correspond to the types of successive nu 阅读全文
摘要:
分析:# 1、青蛙从1跳到X+1# 2、只有1到X的数字在某一个索引的位置填满的时候,取这个索引的值,如果一直取不到就返回Falsedef solution(X, A): B=[] K=-1 for i in A: B.append(i) K+=1 C=set(B) if len(C)==X: re 阅读全文
摘要:
def solution(A): # write your code in Python 3.6 result = 100000 P = 1 while P < len(A): B=sum(A[0:P]) C=sum(A[P:]) result = min(result,abs(B-C)) P += 阅读全文