Easy

Life, the Universe, and Everything

using System;
					
public class Program
{
	public static void Main()
	{
        while(true){
            int num = int.Parse(Console.ReadLine());
	        if(num==42)
	            break;
	        else
                Console.WriteLine(num);
        }	
    }
}

Zoos

using System;
					
public class Program
{
	public static void Main()
	{
		string word = Console.ReadLine();
		int zCount = 0, oCount = 0;
		for (int i = 0; i < word.Length; i++){
			if(word[i] == 'z')
				zCount++;
			else
				oCount++;
		}
		if(2 * zCount == oCount)
			Console.WriteLine("Yes");
		else
			Console.WriteLine("No");
	}
}

Last updated

Was this helpful?