Дата активности | Видеокурс | Прогресс | ||
---|---|---|---|---|
2017-12-06 | game1 | Нано-игры | 60 % | |
2017-11-29 | soft0 | Демо софт | 15 % | |
Итого: | 42 % |
Дата активности | Консольный раздел | Прогресс | ||
---|---|---|---|---|
2017-11-29 | task2 | Алгоритмика | 100 % | |
2017-11-29 | task2 | Do-рацикл | 25 % | |
2017-11-29 | task1 | Целые числа | 29 % | |
2017-11-27 | task1 | Семантика | 100 % | |
Итого: | 79 % |
Приветствую! Успехов!
Вот я ЛОШАРА!
var input = Console.ReadLine();
List<char> temp = input.ToList();
List<char> output = new List<char>();
foreach (var item in temp)
{
output.Add(item);
if (item == '.')
{
output.Add('.');
output.Add('.');
}
}
StringBuilder stringBuilder = new StringBuilder();
foreach (var item in output.ToArray())
{
stringBuilder.Append(item);
}
Console.WriteLine(stringBuilder.ToString());
Почему Тест001 Неверный ответ ? Проверьте алгоритм:
List<double> list = new List<double>();
string s = string.Empty;
double result = 0;
while (true)
{
s = Console.ReadLine();
if (s != ".")
{
list.Add(Double.Parse(s));
}
else
{
break;
}
}
Console.WriteLine("{0:0.00}", list.ElementAt(0));
for (int i = 0; i < list.Count - 1; i++)
{
result = (list.ElementAt(1) + list.ElementAt(i)) / 2;
Console.WriteLine("{0:0.00}", result);
}
string[] input = Console.ReadLine().Split(' ');
double x = double.Parse(input[0]),
y = double.Parse(input[1]);
bool yValue = y >= 0 && y <= 2;
bool rightArea = x >= 0 && x <= 2 && yValue && Math.Sqrt(x * x + y * y) <= 2;
bool leftArea = x <= 0 && x >= -2 && yValue;
Console.WriteLine(rightArea || leftArea ? "YES" : "NO");
string s = Console.ReadLine();
int i = 0;
do
{
i++;
} while (i != s.Length);
Console.WriteLine(i);