mirror of
https://github.com/Oxbian/CodingGame.git
synced 2025-07-07 04:14:27 +02:00
Adding python files
This commit is contained in:
12
Python/Easy_Challenges/horse_racing_duals.py
Normal file
12
Python/Easy_Challenges/horse_racing_duals.py
Normal file
@ -0,0 +1,12 @@
|
||||
import sys
|
||||
import math
|
||||
|
||||
n = int(input())
|
||||
pi = [int(input()) for i in range(n)]
|
||||
pi.sort()
|
||||
min = float('inf')
|
||||
for i in range(1,n):
|
||||
if (pi[i] - pi[i-1] < min):
|
||||
min = pi[i] - pi[i-1]
|
||||
|
||||
print(min)
|
Reference in New Issue
Block a user