Jerry wrote down all the positive integers that have at most 7 digits and
contain only the digits 0 and 1. How many times did he write down the
digit 1 ?  Choose one:	A) 128	B) 224	C) 288	D) 448	E) 512
Jerry wrote down a total of 27 − 1 = 127 numbers (0 is missing). Add 0 to the   numbers Jerry wrote. We divide the resulting 128 numbers in pairs. If x is one of the   numbers Jerry wrote then we put it in pair with 1111111 − x (whose digits are also 0s   and 1s). For example 1100101 is paired with 11010. In this way, we divide the numbers   into 64 distinct pairs so that each number appears exactly once. Note that there are   exactly 7 digits 1 in each pair. So, Jerry wrote the digit 1 exactly 64 × 7 = 448 times.   correct answer 448
<result>D</result>
Jerry wrote down all the positive integers that have at most 7 digits and
contain only the digits 0 and 1. How many times did he write down the
digit 1 ?