ofcRS

Untitled

Nov 4th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.23 KB | None | 0 0
  1. def f(a):
  2.     count = 0
  3.     for i in range(n):
  4.         if a[i] >= sum(a[i+1:]):
  5.             count += 1
  6.         if n-count < 3:
  7.             return (-1)
  8.         elif len(a[i+1:]) == 3:
  9.             return (count)
  10.     return(count)
Advertisement
Add Comment
Please, Sign In to add comment