#C12988. Validate String Conditions
Validate String Conditions
Validate String Conditions
Given a string s, determine whether it satisfies both of the following conditions:
- The string must contain at least three digits, i.e. the number of digit characters (0–9) must be at least \(3\).
- The string must contain no more than five distinct letters (a–z or A–Z), i.e. the number of unique alphabetical characters must be at most \(5\).
If both conditions are met, output True
; otherwise, output False
.
inputFormat
The input consists of a single line containing the string s.
outputFormat
Output a single line: either True
or False
based on whether the conditions are met.
a1b2c3
True