We had a very impressive number of responses to this tricky problem. Thank you everyone who sent in their solutions. There were a couple of different ways of looking at the problem and because you explained your solutions so clearly, we can see that both are equally good.

Cassandra from Impington Village College (Cambridge) says that the 5 appears 170 times on a 24 hour clock and has clearly explained how she worked that out:I counted how many times the 5 was in the units of the minutes (eg 01:25) each hour (6 times) then multiplied it by 24 (144).

Then I counted how many times the 5 appeared in the tens of minutes (eg 12:50) in 24 hours (24).

Finally I counted how many times it appears in the hours section (eg 05:00) (2).

I added it all up and got 170. The answer is the same for the 12 hour clock, because there's just two 5 o'clocks instead of 05:00 and 15:00.

Those of you who agreed with this interpretation were:

Laurie from Rhodes Avenue, George (who didn't tell us where he goes to school), Miriam from Archbishop Temple High School, Edward from WMMS, Xavier from Thomas Deacon Academy, Elliot (who didn't tell us where he goes to school), Alex and Grant from St Benedict', Mike (who didn't tell us where he goes to school) and Shasvat from GIIS. Well done.

Another solution came in from Jonathan from St. Andrews Primary (Devon). This is quite a different solution to Cassandra's because Jonathan looked at the problem in a different way. When Jonathan worked out his total, he counted the 5's that would be on the clock if he looked at it every minute. So, for example, at 05:53 there are two, then at 05:54 there are two, and at 05:55 there are three and so on. Here is his explanation:

My answer is 504. This is how I worked it out. I worked out that 5 appears 16 times in 22 hours (05, 15, 25, 35, 45, 50, 52, 53, 54, 55, 56, 57, 58, 59), but I had to add 60 more 5s when the hour was 5 or 15 to make 76.

I multiplied 16 x 22 to make 352, added 2 x 76 (152) to make my total.

Here is the sum to show what I did: (16 x22) + (76 x2) = 504.

Yes I think it is the same with a twelve hour clock, it just has 2 5s instead of 15.

Michael from Henry Park Primary School in Singapore, Laura and Matthew from Radstock School, Amy from Talycopa Primary, Emily, Tishtrya, Michelle and Fionnuala from Ursuline High School, Oliver from Aycliffe, Calum, Fergus and Nancy from St Anne's Primary, Class 5AH from Aston Fields, Khalid, Piotr and Antranig from Dubai International Academy, Julieta from The Grange School, Jozie and Molly from Cumnor Primary, Jacob from St Edburg's, Caitlin, Molly and Oliver from Great Torrington Junior School, Katie, Theona and Abigail from St Joseph's RC High School, Christopher and Zoe from Randlay Primary School, Isabella from Parkland Junior School, KS2 Class from Ysgol Aberdyfi, Jessica, Isobel, Emma, Lily, Alice, Lotty, Helena, Molly, Martha, Isabella, Lucy, Matilda and Nathalie from St Ives, The Extenstion Maths Group at St Nicolas C of E Junior School and Alex from Waddinton Redwood Primary School all sent in good solutions which agree with Jonathan.

Finally, a special mention to the Junior Class at Ysgol Bryncrug who sent in this Word document which explained their thinking very, very clearly. They also thought the solution was 504 and in the document, they talk us through how they solved the problem. Thank you!