0
$\begingroup$

You just got a new clock, but it's broken. Your friend tells you he can fix it, but he needs a little bit of data from it. One thing he needs is how many times 1 appears in the run of 2 days.

The rules of this broken clock:

  • This is a digital, 12 hour display (AM/PM) clock

  • Every second hour it is blank (odd-valued hours of both days)

  • Every third hour the digits behind ':' are blank (2, 5, 8, and 11 AM and PM of both days)

  • Every fifth hour the digits after the ':' are blank (4AM, 9AM, 2PM, 7PM of day 1, then 12AM, 5AM, 10AM, 3PM, 8PM of day 2)

  • Every time the digits after ':' are a multiple of both 3 and 4, the digit after ':' is blank

If the clock runs for 2 days (starting at 12:00 AM), how many times will '1' appear? Appearances reoccur every minute; thus 12:07 and 12:08 contribute two separate appearances, despite the 1 being displayed constantly.

$\endgroup$
  • 4
    $\begingroup$ Assuming its an analogue clock, 1 appears all the time $\endgroup$ – skv Nov 1 '14 at 3:53
  • $\begingroup$ @skv There is no reason to assume analogue, infact I give reason to assume the opposite. All but one of the rules mention ':' which is on a digital clock, not an analogue. Not to mention an analogue clock can't "go blank" $\endgroup$ – warspyking Nov 1 '14 at 4:00
  • $\begingroup$ When you say it is blank, is it for the entire hour or just at the hour $\endgroup$ – skv Nov 1 '14 at 4:33
  • 3
    $\begingroup$ "every second hour" means: from 0:00 till 0:59 is on... then from 1:00 till 1:59 is off or what? $\endgroup$ – d'alar'cop Nov 1 '14 at 5:04
  • 7
    $\begingroup$ To be frank, I think you should just buy a new clock. $\endgroup$ – tobyink Nov 1 '14 at 8:40
2
$\begingroup$

The answer is 765

Total hours is 48. Odd numbered hours are hidden because of rule no.1

Then based on comments by OP hours 2 5 8 11 2 5 8 11 are removed if they are not already (in the 2 day 4 clock cycles in that order) for rule no.2

Minutes are removed from hours 4 9 2 7 12 5 10 3 8 (if they are not removed for rule no.1 in rule 3.

Removing the hours wont affect the number of 1s as the only hour too be removed are 11 (others dont contain number 1 anyways), but its already removed for rule.1 so number 1 exists in hours 10 and 12 (considering 1 and 11 were removed for rule no.1)

Removing the minutes would affect hours 4,2,12,10,8 hours, based on rule 3 above (leaving 19 hours)

So 19 x 15 1s would appear in minutes (each hour has 15 ones after final rule) that would be 285 times. Since there are 8 hours containing 60 1s each, that would be 480 times making the total appearance of 1s to the answer above

| improve this answer | |
$\endgroup$
  • $\begingroup$ I wrote a Lua script on iPod and got a totally different answer... Could you recount? $\endgroup$ – warspyking Nov 1 '14 at 13:09
  • $\begingroup$ Maybe my script has a glitch in it, cause your answer is way off. Please recount. How is 4684 minutes even possible? $\endgroup$ – warspyking Nov 1 '14 at 13:59
  • $\begingroup$ There's only 2,880 minutes in 2 days. I'm pretty sure there's less than that many 1's with all these rules. $\endgroup$ – warspyking Nov 1 '14 at 14:00
  • $\begingroup$ at 11:11 1 appears 4 times.... I hope you get the point that this cannot be counted as 1 $\endgroup$ – skv Nov 1 '14 at 14:05
  • $\begingroup$ I do. Don't worry about that. $\endgroup$ – warspyking Nov 1 '14 at 14:06
2
$\begingroup$

For every hour, 1 appears 16 times (just minutes).

Reducing multiple of 3s & 4s (12, 24, 36, 48), 1 appears 15 times (just minutes).

For every second hour it is blank, it means it is left with 12 hours per day.

Every third hour the digits behind ':' are blank (3,6,9,12), it means it is left with 8 hours per day (3am, 9am, 3pm, 9pm)

Every fifth hour the digits after the ':' are blank (5,10), it means it is left with 6 hours per day (5am, 5pm).

The hours that are shown are (1am,7am,11am,1pm,7pm,11pm). Taking all the ones (1am, 11am, 1pm, 11pm), 120 '1s' for both 1am and 1pm and 240 '1s' for both 11am and 11pm.

Doing the simple mathematics will be:

120 + 240 + (15*6) = 450. 450*2 = 900 (2days)

Please correct me if i'm wrong.

| improve this answer | |
$\endgroup$
  • $\begingroup$ This is incorrect. The first hour of the day is from 12:00 to 1:00 not 1:00 to 2:00 $\endgroup$ – warspyking Nov 1 '14 at 13:22
  • $\begingroup$ Also note that the every 5th hour continues through both days, so simply calculating 1 day and multiplying by 2 will not return the correct answer. $\endgroup$ – warspyking Nov 1 '14 at 13:27
  • $\begingroup$ if you just change that assumption, you answer would be same as mine $\endgroup$ – skv Nov 1 '14 at 15:37
1
$\begingroup$

765 times

For hours: odd hours are blank, only even hours with 1 are 10 & 12. 2 of each, each day, is:

60*8=480

For minutes: $48-24(blank)=24$, five hour rule takes out 4AM, 2PM on first day & 10AM, 12PM, 8PM on second. $24-5=19$. every hour has 1 6 times on ones, and 10 times on tens, but not on $12=3*4$. Which leaves:

15*19=285

And:

285+480=765

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.