azarov8906
?>

Составьте таблицу, саша забил 3 голаза своюикоманду, петя забил 2 гола, гоша забил 1 гол и вова не забил ни одного гола в пользу своей команды​

Информатика

Ответы

merx80

// C# 7.3

using System;

using System.Collections.Generic;

using System.Collections;

using System.Text;

namespace Rextester

{

   public class Program

   {

       public static void Main(string[] args)

       {

           var crypted = "";

 

           for (int i = 0; i < CaesarCipher.Ru.Length; i++)

               Console.WriteLine(CaesarCipher.Decode(i, crypted));

       }

   }

   

   class CaesarCipher

   {

       public static readonly string Ru = "";

       public static readonly string RuD = "";

       private static readonly int defaultStep = 3;

       public static CaesarEncrypted Encode(int step, string source, Func<string, string> translate)

       {

           string translatedData = translate(source);

           var stringBuilder = new StringBuilder();

           foreach (char c in translatedData.ToLower())

           {

               stringBuilder.Append(RuD[Ru.IndexOf(c) + step]);

           }

           return new CaesarEncrypted(step, stringBuilder.ToString());

       }

       public static CaesarEncrypted Encode(int step, string source)

       {

           return Encode(step, source, x => x);

       }

       public static string Decode(CaesarEncrypted source)

       {

           var step = source.Step;

           return Encode(-step + Ru.Length, source.ToString(), x => x);

       }

       public static string Decode(int step, string source)

       {

           return Encode(-step + Ru.Length, source, x => x);

       }

   }

   class CaesarEncrypted : IEnumerable, IEnumerable<char>

   {

       public int Step { get; set; }

       public string Data { get; set; }

       public CaesarEncrypted(int step, string initData)

       {

           Step = step;

           Data = initData;

       }

       public CaesarEncrypted(string initData) : this(int.MaxValue, initData)

       {}

       public IEnumerator<char> GetEnumerator()

       {

           foreach (char c in Data)

               yield return c;

       }

       IEnumerator IEnumerable.GetEnumerator() => (IEnumerator<char>)GetEnumerator();

       public override string ToString() => Data;

       public static implicit operator string(CaesarEncrypted source) => source.ToString();

   }

}

sryzhova6392
1)
2 Мбайта =2*2^(23) бита ;        16=2^4;
2*2^(23)  :  2^4 = 2^(20) =1048576 символов в сообщении
2)
3*40*60=7200 количество символов
14400*2^3  : 7200 = 16 бит для одного символа
3)
10 кбайт =10*2^13 бит =5*2^14 бит
8*32*40 =2^3 * 2^5 *2^3 *5 =5*2^11
(5*2^14) : (5*2^11) = 2^3 =8 бит для одного символа
2^8 =256 допустимых символов в алфавите
4)
2*32*40 =2* 2^5* 2^3* 5 =5*2^9 символов на листе, на двух страницах
8 Кбайт =8*2^13 бит =2^16 бит
     2^16 :2^3 =2^13 символов в тексте
2^13 : (5*2^9)=2^4 : 5 =3,2 = 4 листа

Ответить на вопрос

Поделитесь своими знаниями, ответьте на вопрос:

Составьте таблицу, саша забил 3 голаза своюикоманду, петя забил 2 гола, гоша забил 1 гол и вова не забил ни одного гола в пользу своей команды​
Ваше имя (никнейм)*
Email*
Комментарий*

Популярные вопросы в разделе

aprelevka
miyulcha8077
julia3594265843
Konstantinovich alekseevna993
avn23
aleksandramir90
maxborod
Серопян
vkurnosov20008
mekap22044
saltikovaK.S.1482
dilovarnazarov1986
sychevao19975
Aksinya1036
windless-el