Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace _02_Encoded_Answers
- {
- class EncodedAnswers
- {
- static void Main(string[] args)
- {
- int N = int.Parse(Console.ReadLine());
- int counterA = 0;
- int counterB = 0;
- int counterC = 0;
- int counterD = 0;
- string result = null;
- for (int i = 0; i < N; i++)
- {
- string answer;
- uint num = uint.Parse(Console.ReadLine());
- if (num % 4 == 0)
- {
- counterA++;
- answer = "a";
- }
- else if (num % 4 == 1 )
- {
- counterB++;
- answer = "b";
- }
- else if (num % 4 == 2)
- {
- counterC++;
- answer = "c";
- }
- else if (num % 4 == 3)
- {
- counterD++;
- answer = "d";
- }
- result += answer + ' ';
- }
- Console.WriteLine(result);
- Console.WriteLine("Answer A: {0}", counterA);
- Console.WriteLine("Answer B: {0}", counterB);
- Console.WriteLine("Answer C: {0}", counterC);
- Console.WriteLine("Answer D: {0}", counterD);
- }
- }
- }
- // https://judge.softuni.bg/Contests/Practice/Index/163#1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement