All Tracks Basic Programming Input/Output Basics of Input/Output Problem

Zoos
Tag(s):

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

Problem
Editorial
Analytics

You are required to enter a word that consists of \(x\) and \(y\) that denote the number of Zs and Os respectively. The input word is considered similar to word zoo if \(2\times x=y\).

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 \(20\).

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 file.
Memory Limit: 256 MB
Source Limit: 1024 KB
Marking Scheme: Marks are awarded when all the testcases pass.
Allowed Languages: Bash, C, C++, C++14, C++17, Clojure, C#, D, Erlang, F#, Go, Groovy, Haskell, Java, Java 8, Java 14, JavaScript(Rhino), JavaScript(Node.js), Julia, Kotlin, Lisp, Lisp (SBCL), Lua, Objective-C, OCaml, Octave, Pascal, Perl, PHP, Python, Python 3, Python 3.8, R(RScript), Racket, Ruby, Rust, Scala, Swift-4.1, Swift, TypeScript, Visual Basic

CODE EDITOR

Initializing Code Editor...
Your Rating:

Contributor

This Problem was Asked in

HackerEarth

Challenge Name

November Circuits '19

OTHER PROBLEMS OF THIS CHALLENGE
Notifications
View All Notifications

?