A simple solution to C: filling the text with words and multiplying by the number of variants, that is, words in the alphabet. The result is a huge number, it does not fit anywhere, so I only keep the degree: 400000 ^ 190. If you add spaces between words, but the degree is 30 less.
#include <stdio.h> const int wordsCount = 400000; const double wordLength = 5.28; const int textLength = 1000; int main () { // количество символов в тексте double symbolCount = 0; // степень количества вариантов unsigned int power = 1; // заполнение текста словами while (symbolCount < textLength) { symbolCount += wordLength;// + 1 для пробелов power++; } // цикл заполняет текст больше лимита, можно вычесть одно словечко power--; // собственно, вывод результатов printf("%d ^ %u\n", wordsCount, power); return 0; }
And Python counted and so:
wordsCount = 400000 wordLength = 5.28 textLength = 1000 count = 1 symbols = 0 while (symbols < textLength): count *= wordsCount symbols += wordLength + 1 count
But the result does not inspire confidence, he lacks zeros at all: