Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace EncodeAnswers
- {
- class Program
- {
- static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- int countA = 0;
- int countB = 0;
- int countC = 0;
- int countD = 0;
- string result=null;
- for (int i = 0; i < n; i++)
- {
- string answer;
- uint numbers = uint.Parse(Console.ReadLine());
- if(numbers%4==0)
- {
- countA++;
- answer = "a";
- }
- else if(numbers%4==1)
- {
- countB++;
- answer = "b";
- }
- else if(numbers%4==2)
- {
- countC++;
- answer = "c";
- }
- else
- {
- countD++;
- answer = "d";
- }
- result += answer + ' ';
- }
- Console.WriteLine(result);
- Console.WriteLine("Answer A: {0}",countA);
- Console.WriteLine("Answer B: {0}",countB);
- Console.WriteLine("Answer C: {0}",countC);
- Console.WriteLine("Answer D: {0}",countD);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement