Weekend Programming Challenge – Week #46 Clock arrows


Image

Problem:

Clock minute and hour arrows cross as they revolve around.
Make code that compute how many times the arrows cross in one twelve hour period, and print list of those times.

The rules:

You can code the solution in any programming language during the weekend and have to submit it to info@olimex.com latest on Sunday March 16th.

On Monday we will upload the solutions on GitHub https://github.com/OLIMEX/WPC

You can play with your real name or with nick if you want to be anonymous, we will not disclosure your personal info if you do not want to.

5 Comments (+add yours?)

  1. Adib
    Mar 14, 2014 @ 21:24:52

    Where does the clock starts from? Adib.

    Reply

  2. paulj
    Mar 16, 2014 @ 00:24:07

    Given that the clock face has 12 hours before it repeats itself, and that the period of time covered is set as 12 hours, the start point should make no difference to the number of times the hands cross, or when they cross.

    Reply

  3. Sergey
    Mar 18, 2014 @ 17:17:12

    Arrows cross 11 times, i.e. every 12h/11=3927.27 seconds, or:

    print(“0:00 1:05 2:10 3:16 4:21 5:27 6:32 7:38 8:43 9:49 10:54”)

    Come on! That’s too easy!

    Reply

  4. Paul
    Mar 18, 2014 @ 18:56:08

    When are you posting the solutions?

    Reply

  5. toutiwaiowai
    Mar 19, 2014 @ 00:02:19

    i agree with sergey… but maybe the difficulty was to FIND this “11”O_o

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: