FAILURE MAP
← Case archive

FA-96410 / Phone number formatting / Member archive

Variable-length area code grouping: odd subscriber numbers are split long-first · case 05

A seven-digit subscriber part prints as 4+3 instead of 3+4.

Member previewVariant 5 · 3 implementations · 8 checks per implementation

Case contract

Keep digits and drop one leading trunk 0; nine national digits must remain. Numbers starting 7 are mobile with a four-digit block code; otherwise the area code is the longest match from 2, 30, 31, 40, 4012 (no match -> None). The subscriber part is one group if at most 5 digits, two equal halves if even, else 3 then the rest. Return "0" + area + " " + groups joined by spaces.

Why this case matters

Area codes of different lengths share leading digits; choosing the wrong one regroups every digit and prints a number users cannot dial.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
two-digit area"030 5505 678""030 550 5678"Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗