Вводите путь к файлу, кол-во букв и цифр будет в консоли и в конце файла
using System;
using System.IO;
using System.Text;
namespace Program
{
class Program
{
static void Main(string[] args)
{
string inputFilePath = Console.ReadLine();
string inputStr = File.ReadAllText(inputFilePath);
int letters = 0, digits = 0;
foreach (var s in inputStr)
{
if (char.IsLetter(s))
++letters;
else if (char.IsDigit(s))
++digits;
}
File.AppendAllText(inputFilePath, $"Letters: {letters}, Digits: {digits}");
Console.WriteLine($"Letters: {letters}\n\rDigits: {digits}\n\r");
Console.ReadKey();
}
}
}
Для кодирования одного из 354231 цветов необходимо log(2)354231 ≈ 18.4 ≈ 19 бит.
Объем изображения = 7177*4889*19 бит = 7177*4889*19 / 8 байт ≈ 83334839 байт.