# At Fours and Eights

My friend, Shashi, likes to play with numbers. For him, maths is a hobby. Can you believe that?

He has spoiled many of my Sundays by making me work on maths problems. So, I feel scared of going to his house.

But friends are forever, and you can't stop visiting your friends — by the way, I am talking about pre-Covid days.

So, I went to Shashi's house on a Sunday and immediately regretted doing so.

Shashi, as usual, was scribbling away furiously. When he saw me, his eyes gleamed in pleasure at finding a prey.

Without even inviting me to sit down, he gave me a paper and pen and said, "A boy is writing down numbers from 400 to 599. While writing down the numbers, he mistakenly writes eight every time instead of four. What is the total number of eights he has written?"

What a cheek! You have a guest at home, but you give him a pen and paper and tell him to solve a problem without even inviting him to sit down!

But I did not feel bad because the problem seemed simple at first glance. All I had to do was write down all the numbers from 400 to 599 and count the number of eights.

It did not take me very long to write down the numbers. It took a little longer to count the eights, but I did it. I told the answer to Shashi, but he told me to recheck. I rechecked six times; each time, I got a different answer. Sometimes, I counted only one 8 in numbers that contained two or three 8s. Sometimes, I missed numbers. Sometimes, I overcounted. I gave up.

Can you tell me how many eights are there in the range 400-599 if a boy mistakenly writes eight every time instead of four?

• Union Public Service Commission - www.upsc.gov.in
• IIT-Kharagpur - www.iitkgp.ac.in
• Indian Statistical Institute - www.isical.ac.in
• Indian Institute of Technology Madras - www.iitm.ac.in
• Indian Institute of Management, Ahmedabad - www.iimahd.ernet.in
• Indian Institute of Mass Commission - www.iimc.nic.in
• IIT Bombay - www.iitb.ac.in