Zoos

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 2 * x =y. . Determine if the entered word is similar to word zoo. For example, words such as zzooooand zzzoooooo are similar to word zoo but not the words such as zzooo and zzzooooo. Input format First line: A word that starts with […]

Continue Reading

Seating Arrangement Problem

Akash and Vishal are quite fond of travelling. They mostly travel by railways. They were travelling in a train one day and they got interested in the seating arrangement of their compartment. The compartment looked something like So they got interested to know the seat number facing them and the seat type facing them. The […]

Continue Reading