Farz0l1x

Untitled

Nov 19th, 2023
707
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. A =[i for i in range(-100, 100)]
  2. B = []
  3. Max = -10**10
  4. for i in range(len(A)):
  5.     if A[i] < 0 and abs(A[i]) % 10 == 3:
  6.         B = B.append(A[i])
  7.         if len(B) == 7:
  8.             Max = max(Max, sum(B))
  9.         else:
  10.             continue
  11.     else:
  12.         B = []
  13. print(Max)
Advertisement
Add Comment
Please, Sign In to add comment