#C13669. License Plate Validator
License Plate Validator
License Plate Validator
You are given a string representing a license plate number. A license plate is considered valid if and only if it meets the following criteria:
- It contains exactly 6 characters.
- The first three characters are uppercase letters from A to Z.
- The last three characters are digits from 0 to 9.
In mathematical terms, if we let \(s\) be the plate string then the validity conditions can be stated as:
\[ |s| = 6, \quad s = L_1 L_2 L_3 D_1 D_2 D_3, \]where each \(L_i\) is an uppercase letter (\(A \leq L_i \leq Z\)) and each \(D_j\) is a digit (\(0 \leq D_j \leq 9\)).
Your task is to implement a validator for license plate numbers that outputs True
if the provided input string is valid according to the above criteria, and False
otherwise.
inputFormat
The input consists of a single line containing a string which is the license plate number to be validated. This input is read from standard input.
outputFormat
Output a single line. Print True
if the license plate is valid; otherwise, print False
. The output should be written to standard output.
ABC123
True