Advertisement
arvind_iyer_2001

Problem B

Jul 7th, 2021
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. def s_b():
  2.     t = int(input())
  3.     arr = []
  4.     for i in range(t):
  5.         n = int(input())
  6.         a = [int(x) for x in input().split()]
  7.         s = sum(a) % n
  8.         inc = (n-s) * s
  9.         arr.append(inc)
  10.     for el in arr:
  11.         print(el)
  12. # s_b()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement