Skip to content

Instantly share code, notes, and snippets.

@Djaxis
Created November 5, 2020 05:37
Show Gist options
  • Save Djaxis/4df99c18559a9c3161588df42d2f4991 to your computer and use it in GitHub Desktop.
Save Djaxis/4df99c18559a9c3161588df42d2f4991 to your computer and use it in GitHub Desktop.
France IOI Planning de la journée
position=int(input()) #lire un entier décrivant votre position actuelle sur la route.
nbVillages=int(input())#lire un entier donnant le nombre de villages.
totalVillages= 0 #lire un entier décrivant la position de ce village le long de cette même route.
for loop in range(nbVillages) :
positionVillage=int(input())
if (positionVillage-position)<=50 and (positionVillage-position)>=(-50) :
#afficher le nombre de villages à une distance inférieure ou égale à 50 km de votre position actuelle.
totalVillages+=1
print(totalVillages)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment