Print hackerearth
Practice
4 (291 votes)
Basic programming
Easy
Problem
89% Success 53531 Attempts 10 Points 1s Time Limit 256MB Memory 1024 KB Max Code

As a beginner to the programming, Mishki came to Hackerearth platform, to become a better programmer. She solved some problems and felt very confident. Later being a fan of Hackerearth, she gave a problem to her friends to solve. They will be given a string containing only lower case characters (a-z), and they need to find that by using the characters of the given string, how many times they can print "hackerearth"(without quotes). As they are new to programming world, please help them.

Input:
The first line will consists of one integer N denoting the length of string.
Next line will contain the string \(Str\) containing only lower case characters.

Output:
Print one integer, denoting the number of times her friends can print "hackerearth" (without quotes).

Constraints:
\(1 \le N \le 10^6\)
Each character of string \(Str\) will be in range \([a,z]\)

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Please wait while we load the editor

Loading...
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:10
83 votes
Tags:
Basic ProgrammingBasics of ImplementationEasyImplementation
Points:10
20 votes
Tags:
Basic ProgrammingBasic MathAlgorithmsNumber theory
Points:10
181 votes
Tags:
Basic ProgrammingEasy