A digit or a letter

3

10 votes
String, Implementation, Recruit, Basic Programming, Algorithms, Easy, String Algorithms, Approved, Hashing algorithm, Hashing algorithm
Problem

You are given a string S of N characters ai. 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

1N10
All ai characters are the standard ASCII characters.

Sample Input
aZ$6
Sample Output
1
2
Time Limit: 1
Memory Limit: 256
Source Limit:
Explanation

There is only one digit in the given string, that is 1.

Two English letters are: a, Z.

Editor Image

?