[Init] Solved solutions

This commit is contained in:
tiennm99 committed 2023-03-02 20:58:03 +07:00
1 parent 51f667ac81
commit 20542601dd
131 files changed
+4148

No files matched your search

+36
View File
@@ -0,0 +1,36 @@
using System;
namespace problem_43A
{
class problem_43A
{
public static void Main(string[] args)
{
int n = int.Parse(Console.ReadLine());
string t1 = Console.ReadLine();
string t2 = "";
int c1 = 1, c2 = 0;
for (int i = 1; i < n; i++)
{
string t = Console.ReadLine();
if (t == t1)
{
c1++;
}
else
{
t2 = t;
c2++;
}
}
if (c1 > c2)
{
Console.Write(t1);
}
else
{
Console.Write(t2);
}
}
}
}