0% found this document useful (0 votes)
820 views

Zoos - Basics of Input - Output & Basic Programming Practice Problems - HackerEarth

The document describes a programming problem to determine if an input word is similar to the word "zoo". The input word will consist of Zs followed by Os. To be considered similar, the number of Zs must be equal to or less than the number of Os. The program must print "Yes" if similar or "No" if not similar. Sample inputs and outputs are provided as examples.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
820 views

Zoos - Basics of Input - Output & Basic Programming Practice Problems - HackerEarth

The document describes a programming problem to determine if an input word is similar to the word "zoo". The input word will consist of Zs followed by Os. To be considered similar, the number of Zs must be equal to or less than the number of Os. The program must print "Yes" if similar or "No" if not similar. Sample inputs and outputs are provided as examples.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

8/27/2020 Zoos | Basics of Input/Output & Basic Programming Practice Problems | HackerEarth


All Tracks  Basic Programming  Input/Output   Problem 

Zoos  BOOKMARK
 

Attempted by: 29690 / Accuracy: 90% / Maximum Points: 10 /      962 Votes /  Share

 Basic Programming, Basics of Input/Output, Input/Output

NEW
PROBLEM EDITORIAL MY SUBMISSIONS ANALYTICS DISCUSSIONS

You are required to enter a word that consists of   and   that denote the number
of Zs and Os respectively. The input word is considered similar to word zoo if  .

Determine if the entered word is similar to word zoo.

For example, words such as zzoooo and zzzoooooo are similar to word zoo but not the


words such as zzooo and zzzooooo.

Input format

First line: A word that starts with several Zs and continues by several Os.
Note: The maximum length of this word must be  .

Output format

Print Yes if the input word can be considered as the string zoo otherwise, print No.

SAMPLE INPUT  

zzzoooooo

SAMPLE OUTPUT  

Yes

Explanation

Time Limit: 0.5 sec(s) for each input le.

Memory Limit: 256 MB

Source Limit: 1024 KB

BEST SUBMISSION  ?

https://www.hackerearth.com/practice/basic-programming/input-output/basics-of-input-output/practice-problems/algorithm/is-zoo-f6f309e7/description/ 1/2

You might also like