From 1a2dbaf181a542392428ccb6ee0f630264805143 Mon Sep 17 00:00:00 2001 From: Samuel Vermeulen Date: Fri, 30 Dec 2022 15:22:25 +0100 Subject: [PATCH] up --- course3jambes.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 course3jambes.py diff --git a/course3jambes.py b/course3jambes.py new file mode 100644 index 0000000..2e8a439 --- /dev/null +++ b/course3jambes.py @@ -0,0 +1,14 @@ +nbParticipants = int(input()) +nbEquipes = int(nbParticipants / 2) +composEquipe = [0] * nbParticipants + +for loop in range(nbParticipants): + composEquipe[loop] = int(input()) + +#print() + +composEquipe.sort() +loopMax = nbParticipants - 1 +for loop in range(nbEquipes): + print("{} {}".format(composEquipe[loop], composEquipe[loopMax])) + loopMax = loopMax - 1 \ No newline at end of file