Pars à la rencontre de petits monstres trop mignons !
Tu es un aventurier qui découvre un nouveau monde merveilleux rempli de petits monstres mignons ! Tu décides de ne pas les déranger et de les étudier tranquillement à distance. Tu cherches à comprendre comment ils se comportent, qu’est ce qu’ils mangent, comment ils grandissent, etc.
En les observant, tu remarques qu’ils ont 4 types d’alimentation :
Un monstre ne mange qu’un seul type d’aliments.
Ces monstres sont rigolos, dès qu’ils mangent, ils grossissent. On va essayer de suivre un petit monstre et comprendre comment il va évoluer.
Selon leur forme on peut déduire une formule mathématique qui décrit comment le monstre va grossir :
Poids gagné = a * (poids aliment) + b.
Tu as à ta disposition ces informations :
Tu dois retourner :
Le poids final du petit monstre en considérant qu’il va manger tout ce qui lui est possible de manger. Pour rappel, on considère que chaque aliment pèse 1.
Si tu as réussi, tu peux te diriger vers le challenge suivant 😉
challenge code for resolution via API: MONSTERS_1
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.
POO : 1 classe et 1 enumThe 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, Fonctions
Other challenges to complete