2+22+222+2222+…… +What is 2222?

2+22+222+2222+…… +What is 2222?


2222 has a total of 10 twos, so the one bit has appeared 10 times, so the one bit is 0. In the same way, these numbers are added together, and the last two bits appear nine twos
By analogy, the result is 2469135800



Calculate the value of 2 + 22 + 222 + 2222 + 22222 by circulation


#include
int main()
{
int i,j,sum = 0;
for (i = 2,j = 0; j < 5 ; j++,i =i * 10 + 2) sum = sum + i;
printf("%d\n",sum);
return 0;
}



2 * 2 = 4 22 * 22 = 484 222 * 222 = 49284 2222 * 2222 = 49237284 is there any rule?


4
four hundred and eighty-four
forty-nine thousand two hundred and eighty-four
forty-nine million two hundred and thirty-seven thousand two hundred and eighty-four
In fact, it's better to remember the law in the figure below. If you multiply it by any other number, you can easily solve it as long as you remember this law