Skip to content

Commit f9d8f52

Browse files
authored
Merge pull request #102 from AxaGuilDEv/refactor/exercices
refactor: rangement d'exercices
2 parents cfe811e + 4ae552f commit f9d8f52

File tree

108 files changed

+69
-3606
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+69
-3606
lines changed

TRAINING/OTHERS/trivialPoursuite/trivialPoursuite.py renamed to TRAINING/2014/MdfMai/exo1-trivialPursuit/trivialPoursuite.py

File renamed without changes.
File renamed without changes.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Les rallonges
2+
3+
function ContestResponse(){
4+
//implement your code here using input array let nb = input.shift()/1;
5+
let atteints = {};
6+
let lTotal = 0;
7+
let mm = [];
8+
let ff = [];
9+
input.forEach(e => {
10+
let [type, longueur] = e.split` `;
11+
if(type == "M-M")
12+
{
13+
mm.push(longueur/1);
14+
}
15+
if(type == "F-F")
16+
{
17+
ff.push(longueur/1);
18+
}
19+
if(type == "M-F" || type == "F-M")
20+
{
21+
lTotal += (longueur/1);
22+
}
23+
});
24+
let sortedMM = mm.sort((a,b) => b-a);
25+
let sortedFF = ff.sort((a,b) => b-a);
26+
while(sortedMM.length > 0 && sortedFF.length > 0)
27+
{
28+
lTotal += (sortedMM.shift() + sortedFF.shift());
29+
}
30+
console.log(lTotal);
31+
}

TRAINING/OTHERS/surveillance/surveillance-John.js renamed to TRAINING/2016/BattleDev0316/exo2-surveillance/surveillance-John.js

File renamed without changes.

TRAINING/OTHERS/surveillance/surveillance-RemiB.js renamed to TRAINING/2016/BattleDev0316/exo2-surveillance/surveillance-RemiB.js

File renamed without changes.

TRAINING/OTHERS/surveillance/surveillance-RemiF.js renamed to TRAINING/2016/BattleDev0316/exo2-surveillance/surveillance-RemiF.js

File renamed without changes.

TRAINING/OTHERS/pipotron/pipotron-John.js renamed to TRAINING/2016/BattleDev0316/exo3-detecteurDePipotron/pipotron-John.js

File renamed without changes.

TRAINING/OTHERS/pipotron/pipotron-RemiB.js renamed to TRAINING/2016/BattleDev0316/exo3-detecteurDePipotron/pipotron-RemiB.js

File renamed without changes.

TRAINING/OTHERS/pipotron/pipotron-RemiF.js renamed to TRAINING/2016/BattleDev0316/exo3-detecteurDePipotron/pipotron-RemiF.js

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)