⌘K
Flycodx

Extract Marathon Runner Bib Numbers

Extract Marathon Runner Bib Numbers

EasyStrings0% accepted

Arjun manages the Mumbai Marathon's checkpoint system. Runner data is stored in format 'BibNumber-RunnerName-Checkpoint' (e.g., '1005-Arjun-5'). He needs to extract bib numbers for result tracking and participant identification.

Approach

Given runner entry strings in format 'BibNumber-RunnerName-Checkpoint', extract and return the bib numbers.

Input

["1005-Arjun-5", "1003-Priya-3", "1001-Ravi-1"]

Output

["1005","1003","1001"]
solution.py
Loading editor...
Test 1
Test 2
Test 3

Press Run to test your custom input, or Submit to judge against all test cases.

Sign in to continue

Create a free account to run code, submit solutions and track progress.

  • Free forever — no credit card
  • 10+ languages with live execution
  • Points, streaks & leaderboards
Auto Save OnLn 1, Col 1Spaces: 4UTF-8LFPython 3