17
Challenge
The challenge is simple:
Taking no inputs and output the following message:
_ __ __
| | | | |
|_ |__| | |
A number of times equal to the number of hours before or after midnight UTC on 31st Dec 2016.
Examples
For example if it is 19:01 UTC dec 31st you should output:
_ __ __
| | | | |
|_ |__| | |
_ __ __
| | | | |
|_ |__| | |
_ __ __
| | | | |
|_ |__| | |
_ __ __
| | | | |
|_ |__| | |
_ __ __
| | | | |
|_ |__| | |
if it is 23:24 UTC dec 31st you should output:
_ __ __
| | | | |
|_ |__| | |
and if it is 1:42 UTC jan 1st you should output:
_ __ __
| | | | |
|_ |__| | |
_ __ __
| | | | |
|_ |__| | |
Clarification: if it is 10-11pm dec 31st you should output two, 11-12pm dec 31st output one, 00-01am jan 1st output one, 01-02am jan 1st output two etc...
Rules
- No Inputs
- Trailing lines or spaces are ok.
- Your program should work any time or day I run it (albeit with a large output). For example on jan 2nd at 00:15am your code should output 25 times.
(This is my first Code Golf question so if I have left any thing important out please let me know.)
This is Code Golf so Shortest bits win
Is the number of hours rounded to the nearest integer? If it's within a half-hour of the New-Year-midnight, should there be no output? – Greg Martin – 2016-12-31T10:08:59.980
@GregMartin See my edit for clarification. – Quantum spaghettification – 2016-12-31T10:10:12.440
What should happen if I run the program on 3 January? – betseg – 2016-12-31T10:16:13.817
@betseg ye I just thought about that to. See edit :). It should work the same even though the output will be large. – Quantum spaghettification – 2016-12-31T10:18:56.640
Nice first question. About rounding: the number of repetitions is the absolute value of the difference between current time UCT and 0:00:00 of Jan 1st UTC, rounded up. Correct? – edc65 – 2016-12-31T10:23:51.443
@edc65 Yep so if you are 45mins from 0:00:00 you should output 1 times if 43hours 15 mins you should output 44 times – Quantum spaghettification – 2016-12-31T10:27:01.070
@Quantumspaghettification What about on 0:00:00 of Jan, it should output nothing? – Gurupad Mamadapur – 2016-12-31T14:04:37.647
@GurupadMamadapur I will leave that open, but I very much doubt that any output at 0:00:00 will be seen since it is only that time for one second (at the most). – Quantum spaghettification – 2016-12-31T16:57:23.380
@Quantumspaghettification Ok great thanks. I'll output
2017
once because it saves bytes :) – Gurupad Mamadapur – 2016-12-31T17:13:33.850I noticed bits are specified, not bytes. I sense an incoming solution in 7 with an argument in comments about scoring. – Pavel – 2016-12-31T22:31:56.500
Hey, can you please update the correct answer? – Gurupad Mamadapur – 2018-03-16T11:48:04.023