1
0
codeforces-template/Codeforces.Console/Program.cs

31 lines
529 B
C#
Raw Normal View History

2023-08-09 09:42:50 +03:00
namespace Codeforces
{
public class Program
{
2023-08-09 15:12:39 +03:00
public static void Main()
2023-08-09 09:42:50 +03:00
{
2023-12-15 23:05:50 +03:00
int count = InputParser.ParseNumber();
2023-08-11 10:08:25 +03:00
for (int i = 0; i < count; i++)
2023-08-09 09:42:50 +03:00
{
2023-12-15 23:05:50 +03:00
var numbers = InputParser.ParseNumbers();
2023-08-09 09:42:50 +03:00
Console.WriteLine(numbers.Sum());
}
}
2023-12-07 22:28:25 +03:00
}
2023-12-15 23:05:50 +03:00
public static class InputParser
2023-12-07 22:28:25 +03:00
{
2023-08-14 13:47:02 +03:00
public static int[] ParseNumbers()
2023-08-11 10:08:25 +03:00
{
return Console.ReadLine()
.Split(' ')
.Select(x => int.Parse(x))
.ToArray();
}
2023-08-14 13:47:02 +03:00
public static int ParseNumber()
{
return int.Parse(Console.ReadLine());
}
2023-08-09 09:42:50 +03:00
}
}