Farz0l1x

Untitled

Nov 19th, 2023
763
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.23 KB | None | 0 0
  1. A = input().split()
  2. Max = 0
  3. for i in range(len(A)):
  4.     Sum = 0
  5.     count = 0
  6.     for j in range(i, len(A)):
  7.         Sum += int(A[j])
  8.         count += 1
  9.         if Sum % 89 == 0:
  10.             Max = max(Max, Sum)
  11. print(Max, count)
Advertisement
Add Comment
Please, Sign In to add comment