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 _08.PrimeNumberCheck
- {
- class PrimeNumberCheck
- {
- static void Main(string[] args)
- {
- char a = char.Parse(Console.ReadLine());
- char b = char.Parse(Console.ReadLine());
- int n = int.Parse(Console.ReadLine());
- int aM = 0;
- int bM = 0;
- for (int i = 1; i <= n; i++)
- {
- string steps = Console.ReadLine();
- if (steps == "UPGRADE")
- {
- a += (char)3;
- b += (char)3;
- }
- else if (i % 2 == 0)
- {
- bM += steps.Length;
- }
- else
- {
- aM += steps.Length;
- }
- if (aM >= 50 || bM >= 50)
- break;
- }
- if (aM > bM)
- {
- Console.WriteLine(a);
- }
- else
- {
- Console.WriteLine(b);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement