A digit or a letter
Practice
3 (10 votes)
String
Implementation
Recruit
Basic programming
Algorithms
Easy
String algorithms
Approved
Hashing algorithm
Hashing algorithm
Problem
89% Success 944 Attempts 20 Points 1s Time Limit 256MB Memory 1024 KB Max Code
You are given a string \(S\) of \(N\) characters \(a_i\). Determine the number of digits and the number of English letters in \(S\).
Input format
First line: String \(S\) of length \(N\)
Output format
- First line: Print the number of digits in \(S\)
- Second line: Print the number of English letters in \(S\)
Constraints
\(1 \le N \le 10\)
All \(a_i\) characters are the standard ASCII characters.
Submissions
Please login to view your submissions
Editorial