using System;
namespace znanja
{
class Program
{
static void Main(string[] args)
{
int num = int.Parse(Console.ReadLine());
int[] array = new int[num];
array = Array.ConvertAll(Console.ReadLine().Split(' ', StringSplitOptions.RemoveEmptyEntries), int.Parse);
int count = 0;
for (int i = 0; i < num; i++)
{
if (array[i] > 0) count++;
}
Console.WriteLine(count);
}
}
}
Да, сможет за 15 секунд
1) 0 + 1 = 1
2) 1 + 1 = 2
3) 2 * 3 = 6
4) 6 + 1 = 7
5) 7 + 1 = 8
6) 8 * 3 = 24
7) 24 * 3 = 72
8) 72 + 1 = 73
9) 73 + 1 = 74
10) 74 * 3 = 222
11) 222 + 1 = 223
12) 223 + 1 = 224
13) 224 * 3 = 672
14) 672 * 3 = 2016
15) 2016 + 1 = 2017