Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- using System.Collections.Generic;
- namespace EncodedAnswers
- {
- class Program
- {
- public static void Main(string[] args)
- {
- var n = int.Parse(Console.ReadLine());
- var countA = 0;
- var countB = 0;
- var countC = 0;
- var countD = 0;
- List<char> letters = new List<char>();
- for(var i = 1; i <= n; i++)
- {
- long answers = long.Parse(Console.ReadLine());
- if(answers % 4 == 0)
- {
- countA++;
- letters.Add('a');
- }
- if(answers % 4 == 1)
- {
- countB++;
- letters.Add('b');
- }
- if(answers % 4 == 2)
- {
- countC++;
- letters.Add('c');
- }
- if(answers % 4 == 3)
- {
- countD++;
- letters.Add('d');
- }
- }
- foreach (var elements in letters) {
- Console.Write("{0} ", elements);
- }
- Console.WriteLine();
- Console.WriteLine("Answer A: {0}", countA);
- Console.WriteLine("Answer B: {0}", countB);
- Console.WriteLine("Answer C: {0}", countC);
- Console.WriteLine("Answer D: {0}", countD);
- Console.Write("Press any key to continue . . . ");
- Console.ReadKey(true);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement