-
Notifications
You must be signed in to change notification settings - Fork 0
/
Beecrowd1181.cs
38 lines (34 loc) · 933 Bytes
/
Beecrowd1181.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
32
33
34
35
36
37
38
using System;
using System.Globalization;
namespace Course
{
class Program
{
static void Main(string[] args)
{
int L = int.Parse(Console.ReadLine());
string T = Console.ReadLine();
double soma = 0.0;
for (int i = 0; i < 12; ++i)
{
for (int j = 0; j < 12; ++j)
{
double numero = double.Parse(Console.ReadLine());
if (i == L)
{
soma += numero;
}
}
}
if (T == "S")
{
Console.WriteLine($"{soma.ToString("F1", CultureInfo.InvariantCulture)}");
}
else
{
soma = soma / 12;
Console.WriteLine($"{soma.ToString("F1", CultureInfo.InvariantCulture)}");
}
}
}
}