Advertisement
Dimaush

25980

Nov 20th, 2022
975
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. n = int(input())
  2. s = 0
  3. min_not_multiple_4 = 10001
  4.  
  5. for i in range(n):
  6.     a = int(input())
  7.     s += a
  8.     if a % 4 != 0:
  9.         min_not_multiple_4 = min(min_not_multiple_4, a)
  10.  
  11. if s % 4 != 0:
  12.     print(n, s)
  13. else:
  14.     if min_not_multiple_4 == 10001:
  15.         print(0)
  16.     else:
  17.         print(n - 1, s - min_not_multiple_4)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement