Marty a cassé la DeLorean, et fait des sauts dans le temps… Aide le à garder le fil…
L’aventure commence le 5 novembre 1985… Date du premier saut dans le temps de Marty…
Marty va enchaîner plusieurs sauts dans le temps d’affilée… Pour qu’il ne subisse pas le mal du voyage dans le temps, il doit compter le nombre d’années qu’il parcourt, dans un sens ou dans l’autre… En prenant en compte également sa date d’anniversaire, pour savoir s’il peut compter l’année dans laquelle il se trouve.
À la fin, tu dois rappeler à Marty le nombre d’années parcourues, à partir de 1985.
Tu commence toujours le 5 Novembre 1985.
A chaque challenge, la date d’anniversaire de Marty change. Elle est donnée au format « MM-JJ » (Mois-Jour).
A chaque saut dans le temps, tu dois compter le décalage par rapport à 1985. Chaque saut est au format « YYYY-MM-JJ » (Année – Mois – Jour).
Mais attention :
Quelques exemples, avec un anniversaire le 6 Juin :
A la fin, tu dois retourner la valeur absolue du décalage complet.
Précision du challenge : Marty n’atterrit jamais en 1985.
challenge code for resolution via API: FUTURE
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, Programmation Orientée Objet, Dates et timestamp
Other challenges to complete