#CJam, <s>31 30</s> 29 bytes 24,[U3]m*"'%02d:%d0', "fe%~7< This is pretty straight forward using printf formatting: 24, e# get the array 0..23 [U3] e# put array [0 3] 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 "'%02d:%d0', "fe% e# this is standard printf formatting. What we do here is e# is that we format each tuple on this string ~7< e# unwrap and remove comma and new line from last line e# by taking only first 7 characters [Try it online here][1] [1]: http://cjam.aditsu.net/#code=24%2C%5BU3%5Dm*%22'%2502d%3A%25d0'%2C%0A%22fe%25~7%3C