⌘K
Flycodx

Extract Valid JEE Roll Numbers

Extract Valid JEE Roll Numbers

MediumStrings0% accepted

JEE applications include roll numbers in format: 2-letter state code + 4-digit year + 5-digit sequence, all separated by hyphens (e.g., 'UP-2024-12345'). Meera analyzes mixed log files to count valid roll numbers.

Approach

Given a string containing multiple roll numbers and other text, count how many valid roll numbers are present in format XX-YYYY-NNNNN where XX is letters, YYYY is year (2000-2099), NNNNN is digits.

Input

MH-2024-12345 delhi-2023 UP-2024-98765

Output

2
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