915 * 65 = 59475 - общее количество строк.
59475 * 72 = 4282200 - общее количество символов.
4282200 * 8 = 34257600 Бит (или 4282200 Байт) - длина двоичного кода.
#include <iostream>
#include <string>
#include <algorithm>
bool P(int value)
{
std::string left = std::to_string(value);
std::reverse(left.begin(), left.end());
std::string right = std::to_string(value);;
return left == right;
}
int main()
{
int n;
std::cin >> n;
int count = 0;
for (int i = 1; i <= n; ++i)
{
if (P(i))
{
count++;
}
}
std::cout << "Count palindrome: " << count << std::endl;
return 0;
}
34 257 600 бит
4 282 200 символов