On poursuit l’étude de ces mignons petits monstres !
Si tu ne l’as pas encore fait, tu peux commencer par Petits monstres mignons #1, le code créé pour ce premier challenge te servira pour celui-ci.
On poursuit l’étude de ces mignons petits monstres. Cette fois-ci on va regarder comment ils se comportent en groupe.
Ces petits monstres se déplacent toujours en groupe de quelques individus. Et ils sont tellement mignons que lorsqu’ils tombent sur un aliment, c’est le plus petit monstre capable de manger cet aliment qui va le manger (= celui qui a le poids le plus faible).
Rappel de la formule mathématique qui décrit comment le monstre va grossir :
Poids gagné = a * (poids aliment) + b.
Cette fois-ci tu as plus d’informations à disposition :
Tu dois retourner :
Le nom et le poids final du petit monstre le plus lourd une fois que tous les aliments ont été mangés. Les informations doivent être séparées par un « : ».
Attention, pour déterminer le plus petit monstre, ou le plus gros, s’il y a une égalité dans les poids, on prendra toujours le monstre qui vient en premier dans l’ordre alphabétique.
challenge code for resolution via API: MONSTERS_2
Some resources to help you:
Data and algorithmic logic Methodologies Corrections
Progress through challenges using our resolution aids: tools, techniques and advice to help you overcome the most complex programming challenges with methodology, confidence and creativity.
Dataset and algorithmic logic
Based on the data and the expected response, use the process to determine the logic to implement.
Show data and progressDevelop a structured approach with our solving guides. Work on specific concepts such as object-oriented programming or unit testing to improve your coding style and progress.
No methodology yet for this challenge, but we are working on it! Follow us to be informed of the release!
The corrections allow you to discover certain technical concepts but will also give you a solution to the challenge. Code the challenge yourself before consulting the corrections ;)
No answer yet for this challenge, but we&'re working on it! Follow us to be informed of the release!
Programming concept(s) that can be used to solve this challenge: Conditions, Tableaux, Programmation Orientée Objet, Fonctions
Other challenges to complete