⌘K
Flycodx

Parse Masked Aadhaar from Log Entry

Parse Masked Aadhaar from Log Entry

EasyStrings100% accepted

Arjun analyzes authentication logs at UIDAI's Bangalore office. Each log entry contains a masked Aadhaar like 'XXXX-XXXX-5678' (first 8 digits masked as X, last 4 visible). Extract the visible portion for audit trails. Return the digits as an integer (drop leading zeros — '0001' → 1).

Approach

Given a masked Aadhaar string formatted as 'XXXX-XXXX-ABCD' with hyphens, extract and return the last 4 visible digits.

Input

XXXX-XXXX-5678

Output

5678
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