mirror of
https://github.com/tiennm99/codeforces.git
synced 2026-10-14 10:18:15 +00:00
[Init] Solved solutions
This commit is contained in:
1 parent
51f667ac81
commit
20542601dd
131 files changed
+4148
No files matched your search
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user