Visual illustration of the code challenge: Traversée 26 #6 The corrected archives

Traversée 26 #6 The corrected archives

The Monolith is getting closer, but the archives of Sector 26 no longer all tell the same story. Help your agents recover the traces that have not yet been rewritten.
Coding in the sandbox You must be logged in to access the sandbox.

Mission

Your agents have crossed the reassembled route and are now moving toward an old archive zone in Sector 26. Before the quarantine, this center stored urban plans, maintenance histories, local decisions, and part of the territory’s administrative memory.

But inside, everything looks too clean. The documents are classified, the terminals respond, and the digital copies are perfectly readable. Some data even seems to have been restored. And yet, the versions do not always match: dates have changed, incidents have disappeared, and identical fragments no longer always carry the same year.

The signal from the Monolith still runs through these archives, clearer than before, as if all corrections were converging toward it. To continue the Crossing, you must help your agents distinguish intact human traces from altered copies, and recover the years still confirmed by several registers.

Rules

You have 1 variable available:

  • records is the list of archive copies, in the format "REGISTER:FRAGMENT:YEAR", for example "A:K3:42".

In each copy:

  • REGISTER is a letter;
  • FRAGMENT is a letter followed by a digit from 1 to 9;
  • YEAR is an integer.

A year is considered an intact human trace when it is associated with the same fragment in at least two different registers.

Two copies from the same register do not count as two different confirmations.

A year that appears in only one register for a given fragment is considered an altered copy: it must be ignored.

A year is intact when, for the same fragment, it appears in at least two different registers. You add each confirmed year only once to the total, even if several fragments confirm it.

You must output the sum of the intact years.

This sum represents the traces that are still sufficiently confirmed to be considered reliable in the sector’s corrected archives.

Example: with the copies "A:K3:42", "B:K3:42", and "C:K3:17", the expected result is 42.

Solve the challenge

To code this challenge, several possibilities:
- Want to start coding right away? Use the online Sandbox.
- You can also copy/paste a dataset below.

challenge code for resolution via API: TRAVERSEE_6

Some resources to help you:
Data and algorithmic logic Methodologies Corrections

Support for resolution

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 progress

Methodologies

Develop 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!


Corrections

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 ;)

Programming concept(s) that can be used to solve this challenge: Conditions, Tableaux, Booléens, Fonctions, ,

Keep coding

Other challenges to complete

Intermediate
WALL-E #1

WALL-E #1

Wall-E est un robot dont la mission est de nettoyer la Terre. Tu dois coder son fonctionnement pour qu’il traite efficacement ces déchets. Néanmoins, sois vigilant pour ne pas épuiser sa réserve d’énergie !

Behavioral Corrigés dispos : PHPPHP
Beginner
Avengers

Avengers

Aide les Avengers à battre Thanos ! Mais combien de fois devras-tu essayer ?

Behavioral Corrigé disponible : Javascript
Intermediate
CodeMind #4 : Nutrition

CodeMind #4 : Nutrition

En avant pour le challenge 4 de CodeMind : Transforme tes habitudes alimentaires en alliées de ta santé mentale !

Behavioral