C#. Пример работы на изображении. (Входные данные отличаются)
using System;
using System.Collections.Generic;
using System.Linq;
namespace NSymbs
{
class Program
{
static void Main(string[] args)
{
string input;
input = Console.ReadLine();
int[] param = input.Split("\t ".ToCharArray()).Select(x => int.Parse(x)).ToArray();
input = Console.ReadLine();
int z = input.Length / param[1];
List<string> bufer = new List<string>();
for (int i = 0; i < z; ++i)
bufer.Add(input.Substring(i*param[1], param[1]));
Console.WriteLine(bufer.Distinct().Count());
}
}
}
1 - delete
2. - с зажатым Ctrl
100111.1_2 = 1*2^5+1*2^2+1*2^1+1*2^0+1*2^(-1) = 32+4+2+1+1/2 = 39.5
Шоколад - x;
зефир - y;
x+y=15000;
y=12000;
x=15000-12000=3000;
Ответ: 3000