answersLogoWhite

0


Best Answer

We will have to count the same number multiple times (i.e., if a number has two fours, it will have to be counted twice). That is what makes this problem sort of tricky. Because the range is pretty small, we can solve it by just thinking it through in small cases:

Case 1: For the numbers: 400-499

  • There are 100 digits that start with 4
  • There are 10 digits that have a second digit of 4 (i.e., 440-449)
  • There are 10 digits have that a last digit of 4 (404, 414, ... , 494)

(note: any type you are counting 0 to 9, you can assume 10 numbers, because the 0 counts as well)

The total number of four's in the interval [400,499] = 100+10+10 = 120

Case 2: For the numbers: 500-599

  • There are 0 digits that start with 4
  • There are 10 digits that have a second digit of 4 (540 - 549)
  • There are 10 digits that have a last digit of 4 (504, 514, ... , 594)

The total number of four's in the interval [500,599] 10+10=20

There is not a third case. The only digit left is 600, and it obviously has no fours.

Therefore your answer is the sum of the two cases: 120 + 20 = 140

The numbers happen to be as follows (note: I've listed each number the number of times four appears, so for example 444 appears 3 times)

400, 401, 402, 403, 404, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 434, 435, 436, 437, 438, 439, 440, 440, 441, 441, 442, 442, 443, 443, 444, 444, 444, 445, 445, 446, 446, 447, 447, 448, 448, 449, 449, 450, 451, 452, 453, 454, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 494, 495, 496, 497, 498, 499, 504, 514, 524, 534, 540, 541, 542, 543, 544, 544, 545, 546, 547, 548, 549, 554, 564, 574, 584, 594

You can also numerically count your answers with computer code. Here is a script that will give you the answer (it's written in PHP, but it should translate to other languages).

$count = 0;

for ($i=400; $i<601; $i++) foreach (str_split($i) as $digit) if ($digit==4) $count++;

echo $count;

Again the answer is 140.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How many times do you write 4 when you write the numbers from 400 to 600?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions