#201. 字符串特定字符计数

    ID: 201 Type: Default 1000ms 256MiB Tried: 0 Accepted: 0 Difficulty: (None) Uploaded By: Tags>codingbatWarmup-1gesp3字符串循环结构

字符串特定字符计数

Character 'e' Count

Background

Dawei is currently studying string processing and has devised a simple problem to test everyone.

Problem Description

Return true if the given string contains between 1 and 3 'e' characters (inclusive), otherwise return false.

Input Format

Input is given from standard input in the following format.

string S

Output Format

Output is printed to standard output in the following format.

boolean result

Sample

Hello
true
Heelle
true
Heelele
false

Sample Explanation

For Sample 1, the string "Hello" contains one 'e', which is between 11 and 33, so true is returned. For Sample 2, the string "Heelle" contains two 'e's, which is between 11 and 33, so true is returned. For Sample 3, the string "Heelele" contains four 'e's, which is not between 11 and 33, so false is returned.

Constraints

1s, 1024KiB for each test case.