SHARE
TWEET

Untitled

a guest Oct 13th, 2017 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. n = int(input())
  2. t = list(map(int, input().split()))
  3. k = 0
  4. t.sort()
  5. for i in range(0, n):
  6.     for i1 in range(i + 1, n):
  7.         for j in range(i1 + 1, n):
  8.             if (t[i] + t[i1] > t[j]):
  9.                 k += 1
  10. print(k)
RAW Paste Data
Top