#211. 递归统计字符'x'数量
递归统计字符'x'数量
Count 'x' Recursively
Background
Congcong is currently learning string manipulation. He encountered an interesting problem that requires him to solve it using recursion.
Problem Description
Given a string, compute recursively (no loops) the number of lowercase 'x' chars in the string.
Input Format
Input is given from standard input in the following format.
Output Format
Output is printed to standard output in the following format.
Sample
xxhixx
4
xhixhix
3
hi
0
Sample Explanation
For the first sample xxhixx, there are 4 lowercase 'x' characters in the string.
For the second sample xhixhix, there are 3 lowercase 'x' characters in the string.
For the third sample hi, there are no lowercase 'x' characters in the string.
Constraints
Time limit: 1 second per test case. Memory limit: 1024 KiB per test case.