Skip to main content
1 of 4
Optimizer
  • 26.6k
  • 7
  • 66
  • 142

#CJam, 31 bytes

24,"03"m*{':*''\s4Ue[0''',N}/;;

This is pretty straight forward:

24,                              e# get the array 0..23
   "03"                          e# put this string on stack
       m*                        e# do a cartesian product between 0..23 and ['0,'3] array
                                 e# now we have tuples like [[0 '0], [0 '3] ... ] etc
         {                }/     e# iterate over all such tuples
          ':*                    e# join the pair with : tuples become like [0 ': '0]
             ''\                 e# insert a quote before it
                s4Ue[            e# convert the tuple to string and make sure it has a
                                 e# padded zero before 0 to 9 hrs
                     ''',        e# put two characters, quote and comma
                         N       e# put a new line
                            ;;   e# remove comma and new line from last line

Try it online here

Optimizer
  • 26.6k
  • 7
  • 66
  • 142