Created
November 5, 2020 05:37
-
-
Save Djaxis/4df99c18559a9c3161588df42d2f4991 to your computer and use it in GitHub Desktop.
France IOI Planning de la journée
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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