Advertisement
Guest User

Untitled

a guest
Mar 24th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. import sys
  2. import math
  3.  
  4. # Auto-generated code below aims at helping you parse
  5. # the standard input according to the problem statement.
  6.  
  7. n = int(input())
  8. pi = []
  9. for i in range(n):
  10. pi.append(int(input()))
  11.  
  12. pi.sort()
  13. mini = 9999
  14. for i in range(1,n):
  15. mini = min(mini,abs(pi[i]-pi[i-1]))
  16.  
  17. print(mini)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement