-
Notifications
You must be signed in to change notification settings - Fork 54
/
Copy pathCSharp.cs
31 lines (27 loc) · 879 Bytes
/
CSharp.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/****************************************/
/* */
/* CodinGame.com Solutions by pathosDev */
/* */
/* Puzzle: Onboarding */
/* Difficulty: Easy */
/* Date solved: 08.11.2018 */
/* */
/****************************************/
using System;
public class Solution
{
public static void Main()
{
//Game loop.
while (true)
{
//Read inputs.
string enemy1 = Console.ReadLine();
int dist1 = int.Parse(Console.ReadLine());
string enemy2 = Console.ReadLine();
int dist2 = int.Parse(Console.ReadLine());
//Output nearest enemy.
Console.WriteLine(dist1 < dist2 ? enemy1 : enemy2);
}
}
}