Count the number of digits, letters, and special characters in a string.
Difficulty: Medium
Phase: 5 · Strings
XP Reward: 20 XP
Topics: Strings, Medium
Supported Languages: Python, JavaScript, C, C++, Java
Problem Description
Take a string and print count of letters, digits, and special characters in format 'Letters: L, Digits: D, Special: S'. Input Format: Read input from standard input (stdin). Output Format: Print the result to standard output (stdout).
Constraints
- -10^9 <= N <= 10^9
Examples
Example 1
Input: a1!b2@
Output: Letters: 2, Digits: 2, Special: 2
Explanation: Sample execution for input a1!b2@