Questions tagged [clock]

The clock tag is used for challenges specifically related to clocks and the display of absolute time. Usually it should not be used for challenges about relative time.

Filter by
Sorted by
Tagged with
18 votes
17 answers
3k views

Convert angle to clock time

Your task is to make a program or function that takes a nonnegative integer (or a different convenient format to represent it) that represents an angle measure in degrees from 0 to 180 (inclusive) as ...
user avatar
  • 1,841
12 votes
10 answers
849 views

Stepping Through Time

Given a 24 hour time, e.g. 20:48, output the nearest time where each adjacent pair of digits has an absolute difference of 1, e.g. 21:01. That is, each number in the output must differ from the ...
user avatar
  • 589
5 votes
0 answers
231 views

Analog clock using braille UTF8 characters [closed]

Inspired by Braille graphics and Build an analog clock. The goal there is to create a tool that use terminal console to draw and animate a clock by using UTF-8 fonts ...
user avatar
  • 2,924
7 votes
1 answer
268 views

Read an ASCII clock

Related to, but not a duplicate of, this challenge. Basics This is a clock: ...
user avatar
14 votes
6 answers
806 views

Match the Striking Clock

Introduction: At home we have a clock that strikes the stated amount at each hour, but also strikes once at every half-hour. So from 0:01 to and including 12:00 it strikes in this order: ...
user avatar
31 votes
44 answers
2k views

Output the hours at 90 degrees

Today while playing with my kids I noticed that an apparently simple toy in the park hid a challenge. The wheel has a triangle that points to a number, but also has three circles that point to the ...
user avatar
  • 12.6k
19 votes
17 answers
3k views

Mirrored Digital Clock

Many digital clocks display the time using simplified digits comprised of only seven different lights that are either on or off: When mirrored horizontally, the digits ...
user avatar
  • 16.2k
24 votes
23 answers
4k views

How many times will a bell tower ring?

Introduction A bell tower will ring its bells every hour, n times, with n being the the current hour on a 12 hour clock. For ...
user avatar
  • 2,451
4 votes
1 answer
293 views

Risky Phone Plan

You have a phone plan that lets you talk 180 minutes a day. Every day that you go over your daily limit you have to pay a fine of F = Men, where M is the number of minutes you went over and n is the ...
user avatar
  • 6,536
10 votes
1 answer
384 views

Digital Clock Matches Puzzle

There are many puzzles with matches that involve adding, removing, or moving a certain number of matches to create new numbers or shapes. This is like that with a digital clock. Given a valid time on ...
user avatar
  • 6,536
38 votes
26 answers
2k views

ASCII clock with dot & comma time markers

Introduction Imagine that line of chars is in fact two rows. Upper row - dots - represents hours (24 hour system), while lower - commas - represents minutes. One character can represent hour, minute ...
user avatar
  • 481
15 votes
1 answer
814 views

Arithmetic... tock... tick... tock

This question brought to you by a game I like to play when stuck in long phone meetings. Given any two times from a 24 hour clock (from 00:00 to 23:59), how many valid mathematical equations can be ...
user avatar
2 votes
1 answer
1k views

Make a working digital clock with ascii numbers [duplicate]

The challenge is make a digital clock that exhibits ascii numbers in a 24-hour format like: _ _ _ _ |_| |_| . |_| |_| |_| |_| . |_| |_| or ...
user avatar
-4 votes
5 answers
452 views

What time is it? [closed]

I really hate looking up to the top right of the screen to look at the time on OS X's clock widget; I'd much rather keep my eyes at least somewhere near my workspace to check the time. I also hate ...
user avatar
  • 3,590
39 votes
21 answers
7k views

Angle between the hands on a clock [duplicate]

Given the time in 24 hour format (2359 = 11:59pm) return the angle between the minute and hour hands on a standard clock (on the ...
user avatar
  • 1,009