Category: Programs

Categories:

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 […]

Categories:

You have been given a String “S” and you have to find and print whether this string is a palindrome or not. If yes, print “YES” (without quotes), else print “NO” (without quotes). Input FormatThe first and only line of input contains the String S. The String shall consist of lowercase English alphabets only. Output […]

Categories:

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 […]