text:
Legen… wait for it…
dary!
In events entirely unrelated to what will hopefully happen to me in the next couple of days, I task you to write code that does the following:

Print
Legen... wait for it...

immediately, with a trailing newline.
Wait until the next full hour (when the cron job for awarding the badge runs).
Print
dary!

with an optional trailing newline.

Additional rules

You may write a program or a function, but the output has to be printed to STDOUT (or its closest alternative of your language).
You have to wait until the next full hour, not just for 60 minutes. If the code is run at 6:58, it should print the second line at 7:00.
The last line must be printed no later than one second after the next full hour.
In the event that the program is started in the first second of a full hour, it should it wait for the next full hour.
You may query local or UTC time.
Standard code-golf rules apply.

Related, but different in subtle ways that make approaches to the old challenge inapplicable here: Is it Christmas?

I don't understand how the third additional rule differs from the basic "wait until the next full hour"

@Fatalize That's just a clarification that you have to wait until the hour changes, not until the minutes and seconds are both at 00.

Happy Legendary Badge, @Dennis!

@ΚριτικσιΛίθος Thanks! (Thank god for tab-completion.)

"On the hour" would be a more standard (and I believe much more clear) way of describing what you call "the next full hour" (at least in American English).

Pyth, 42 41
J.d6." wâ«hÖ`Ùá©h´^"WqJ.d6;"dary!

Below is a hexdump of the code:
00000000  4a 2e 64 36 2e 22 20 77  0c 10 89 e2 ab 1b ad 68  |J.d6." w.......h|
00000010  0f 8c d6 60 d9 e1 a9 68  82 b4 5e 22 57 71 4a 2e  |...`...h..^"WqJ.|
00000020  64 36 3b 22 64 61 72 79  21                       |d6;"dary!|

Saved 1 byte thanks to @isaacg
Uses the .d function to get local time related values. .d6 returns the current hour. This prints the first string, then waits until the hour is different from the hour ad the start of the program, and then prints the second string.
You could try it online with .d7 or .d8 for minutes/seconds but the online compiler only prints anything when the program terminates.
Congrats, Dennis! :)

The string can be compressed by 1 bytes using packed-str. Hexdump: 0000000: 2e22 2077 0c10 89e2 ab1b ad68 0f8c d660  ." w.......h...` 0000010: d9e1 a968 82b4 5e22 0a                   ...h..^".

@isaacg Whoops, I had checked that but I must have messed up counting. I thought it only compressed 1 byte so the extra . would make it the same length. Silly off-by-one errors :P

Just trying to figure out what this might do (with no experience with pyth at all) made me laugh. I see dary, but no legen! And pyth claims to be easier to understand by those used to conventional programming...

@Cyoce If you look in the edit history you can find an easier to read version. The ." indicates that the string should have some operations performed on it to get the real string. It's just a compression trick for golfing. If you decide to try to learn Pyth, best of luck! Don't forget there is a chatroom for it too :)

JavaScript (ES6), 74 bytes
You may want to change your system clock before testing, congratulations if you landed here at 59 minutes past.

setTimeout(a=alert,36e5-new Date%36e5,"dary!");a`Legen... wait for it...
`

Would 36e5 work in place of 3.6e6?

@ETHproductions You beauty!

@ETHproductions That is some bad scientific notation. I had no idea it worked on Javascript. Learned something today!!!

"a\dary!`",new Date%36e5`

Also, alert is such bad word that storing it in a local variable for a single extra use case does not help in golfing ;)

@Optimizer Ah didn't know setTimeout would eval for me. True... I was originally trying to use console.log but that doesn't even work when stored in a variable due to context. You too are beautiful!

Also, at this point, you can skip the | and simply replace it with ,. Same difference though :)

Hah! I got here at 2 minutes past the hour!

You could use setTimeout properly and even save one byte: alert`Legen…`;setTimeout(alert,36e5-new Date%36e5,"dary!")

…and then two more: setTimeout(a=alert,36e5-new Date%36e5,"dary!");a`Legen…`

Ha, nice one. :-)

Neither setTimeout nor alert are part of EcmaScript 6, these are rather from the HTML side of things. As for the use of alert, this also makes the solution non-portable as alert: 1) can optionally pause until the user acknowledges the message (which is how actual browsers tend to implement it) and 2) is not required to print messages on separate lines (actual browsers tend to use modal dialog windows), which means this does not necessarily produce the required results unless executed in a particular (unstated) environment.

@HåkanLindqvist tagged template strings are ES6, I don't feel the need to specify a HTML spec, I think that would just be pedantry. Dialogs can and do contain newlines in most popular browsers. The rest while true if Dennis wants to declare invalid the usage of alert I will happily change it to console.log. I had similar reservations but saw other answers being generally accepted with it so used it also to be competitive.

@Bergi Nice! Surely we have peaked now.

@GeorgeReith check out my solution for 66 bytes, which is valid for any JavaScript REPL console. By compiling it into Bean I golfed it down to 58 ;)

CJam, 49 48 bytes
et3="Legen... wait for it...
"o{_et3==}g;"dary!"

Uses local time. For testing purposes, you can replace the two instances of 3 with 4 or 5 to make it print at the start of the next minute/second.
Test it here. But note that the online interpreter doesn't show any output until the program terminates. Alternatively, you can run it on Try it online, where the output is shown almost immediately instead of being buffered (but when you test it with seconds instead of hours, the delay will be noticeable). In any case, if you run it locally with the Java interpreter, it works like a charm.
Explanation
This makes use of CJam's et which gives you an array of
[year month day hour minute second ms weekday utc_offset]

Here is a breakdown of the code:
et3=       e# Get the current hour.
"Legen..." e# Push the first string including the linefeed.
o          e# Print it.
{          e# While the top of stack is truthy (which is popped)...
  _        e#   Copy the original hour.
  et3=     e#   Get the current hour.
  =        e#   Check for equality.
}g
;          e# Discard the original hour.
"dary!"    e# Push the second string which is printed automatically.

Bonus
This also works for the same byte count:
et4<"Legen... wait for it...
"o{et1$#!}g;"dary!"

Instead of selecting the hour, we're selecting the prefix with the date and the hour, and keep the loop going while the datetime array still has that prefix.

AppleScript, 157 149 bytes
Huh. Surprisingly contending.
set d to number 1 in time string of(current date)
log"Legen... wait for it..."
repeat while d=number 1 in time string of(current date)
end
log"dary!"
Since log prints to the Messages pane of Script Editor, I consider it to be the closest output to STDOUT. Basically, if you get the time string of current date, it'll do something like this:
Code:
time string of(current date)
Output:
5:02:03 PM
It will grab the first number (5) before the colon.
I thought it'd be a lot longer than this, actually. xD

So what happens if you run it at 03:03:00?

@BlacklightShining It will get the number 3 at the front and wait until it is four. It is only aware of the number before the colon.

Oh, I missed that. Okay. Oddly enough, I'm actually getting just "1" from number 1 in time string of(current date)…

@BlacklightShining You're likely using an older version - in El Capitan, this is equivalent to first number in time string of (current date).

I'm on Yosemite, yeah. first number also gives me just the first digit of the time ("0" right now, at 04:38).

@BlacklightShining Odd. Next time I get on the computer, I'll record a run of it and YouTube it or something.

Snowman 1.0.2, 70 69 bytes
~"Legen... wait for it...
"sP3600000*vt#nDnC!*:vt+#nD!#nL;bD"dary!"sP

Explanation:
~              Make all variables active.
"..."sP        Print the first string.
3600000*vt#nD  Get the number of hours since the Unix epoch.
nC             Ceiling (round up), giving the time (divided by 36000) at which to
                 print the second string.
!*             Save that in a permavar.
:...;bD        Do the stuff in the block while its "return value" is truthy.
  vt+#nD       Again, get the number of hours since epoch.
  !#             Store the permavar that we saved earlier.
  nL             Is the current time less than the target time? (if so,
                   keep looping)
"..."sP        Print the second string.

Perl 6, 60 bytes
sleep 60²-now%60²+say 'Legen... wait for it..';say 'dary!'

I would like to note that 60² was just added a few days ago

Wow, so close to being ineligible for this challenge!

Congrats on 10k!

PHP, 76, 70, 65, 62 51 bytes
Legen... wait for it...
<?while(+date(is));?>dary!

Previous logic (63b):
Legen... wait for it...
<?for($h=date(G);date(G)==$h;)?>dary!

This kind of coding makes you loose your job, but this loops until the time is 1 hour further than init.
-1 byte by replacing {} afer the while to ; (thanks manatwork)
-5 bytes by replacing echo'dary!'; to ?>dary! (thanks manatwork)
-4 bytes by replacing <?php to the short version <? (thanks primo)
-1 byte by replacing the while for a for
-3 bytes by replacing date(G)!=$h+1 to date(G)==$h (thanks primo)

Nice one, but {} → ; and echo → ?> would reduce it a bit. Though I would prefer Legen... wait for it...↵<?php while(+date('is'));?>dary!

A few tips: you can use short open tags (just <? rather than <?php). Using for(;;) is the same length as while(), but allows you to move the $h assignment, without needing a semi-colon (for($h=date(h);...). The {} weren't necessary, but neither is the ; preceding ?>. You may have a problem with $h is 12, though (date(h) will never be 13).

Thank you both, updated my answer accordingly. Im not feeling too well, guess I shouldnt do important work today, because it clearly shows haha

I stand corrected, I almost need to add you as a co-author to my answer

Change date(G)!=$h+1 to date(G)==$h. Shorter, and solves the hour problem ;) Also, remove the semi-colon before ?>.

Just my curiosity, but is there a technical issue that I missed with the +date('is') condition I suggested? Or just feeling it is too different?

Nope, just didn't look into it. I like the way it works, clever. The quotes arent needed, so removed those and updasted my answer

@manatwork it will fail to wait if the code is run at HH:00:00, i.e. within the first second of a full hour.

You could overcome that by using u for microseconds, but that would required the script to hit every microseconds or it'll wait another hour

Wait, is isn't a keyword? Learn something new every day...

Oops. Missed that. Thank you @primo. And sorry Martijn.

You could use the u for microseconds, lowering the chances to almost none, but the code would have to loop that exact microsecond.

Javascript 94 90 87 bytes
Not golfed that much...
alert`Legen... wait for it...`,l=l=>~~(Date.now()/36e5);for(z=l();z==l(););alert`dary!`

Downgoat's version:
(a=alert)`Legen... wait for it...`,z=(b=new Date().getHours)();for(;z==b(););a`dary!`

It stores the current hour and loops for as long as the "old" hour is equal to the current one. As soon as the hour has changed, it will print the rest! :D
Disclaimer:
If your browser dislikes it, you have been warned.

87 bytes: (a=alert)\Legen... wait for it...`,l=new Date,z=(b=l.getHours)();for(;z==b(););a`dary!``

@Downgoat Thanks! (I am trying to golf it right now..)

Even shorter (85 bytes): (a=alert)\Legen... wait for it...`,z=(b=new Date().getHours)();for(;z==b(););a`dary!``

@Downgoat One byte shorter: for((a=alert)`Legen... wait for it...`,z=(b=new Date().getHours)();z==b(););a`dary!`

Python 2, 82 81 bytes
from time import*;print'Legen... wait for it...';sleep(-time()%3600);print'dary!'

Too low a reputation to comment. Python 2 version of Alexander Nigl's solution. Saves characters lost on brackets. Also, 3600 not needed in the sleep time calculation.
7 characters saved overall.
Edit: -1 byte thanks to @Kevin Cruijssen

One additional byte can be saved by removing the trailing ; at the end of the program. Seems to work fine without it. :) Nice answer though, so +1 from me (now you can comment).

thanks loads @KevinCruijssen

Mathematica, 85 84 81 bytes
c=Print;c@"Legen... wait for it...";a:=DateValue@"Hour";b=a;While[a==b];c@"dary!"

I think you can save 2 bytes by making "dary!" the expression output.

@CatsAreFluffy Then it would just be a snippet and not a full program.

So? Isn't expression output acceptable in Mathematica, or am I missing something?

@CatsAreFluffy Mathematica scripts exist, so any given full program is expected to run in one.

MATLAB - 89 bytes
a=@()hour(now);disp('Legen... wait for it...');while(mod(a()+1,24)~=a())end;disp('dary!')

Pretty self-explanatory.  First, create a function handle to grab the current hour of the system clock.  Then, display Legen... wait for it... with a carriage return, and then we go into a while loop where we keep checking to see if the current hour added with 1 is not equal to the current hour.  If it is, keep looping.  Only until the instant when the next hour happens, we display dary! and a carriage return happens after.
MATLAB's hour is based on 24-hour indexing, so the mod operation with base 24 is required to handle spilling over from 11 p.m. (23:00) to midnight (00:00).
Minor Note
The hour function requires the Financial Time Series toolbox.  The now function is not subject to this restriction, but it retrieves the current date and time as a serial number which hour thus uses to compute the current hour.
Want to run this in Octave?
Sure!  Because Octave doesn't have this toolbox, we'd just have to modify the hour function so that it calls datevec which returns a vector of 6 elements - one for each of the year, month, day, hour, minutes and seconds.  You'd just have to extract out the fourth element of the output:
a=@()datevec(now)(4);disp('Legen... wait for it...');while(mod(a()+1,24)~=a())end;disp('dary!')

The additional characters make the solution go up to 98 bytes, but you'll be able to run this in Octave.  Note the in-place indexing without a temporary variable in the function handle.
No Financial Time Series Toolbox?
If you want to run this in MATLAB without the Financial Time Series Toolbox, because you can't index into variables immediately without at temporary one, this will take a bit more bytes to write:
disp('Legen... wait for it...');h=datevec(now);ans=h;while(mod(h(4)+1,24)~=ans(4)),datevec(now);end;disp('dary!');

This first obtains the current time and date and stores it into the variable h as well as storing this into the automatic variable called ans.  After, we keep looping and checking if the current hour isn't equal to the next hour.  At each iteration, we keep updating the automatic variable with the current time and date.  As soon as the next hour matches with the current time and date, we display the last part of the string and quit.  This pushes the byte count to 114.

Also take note that you can't try this online.  Octave interpreters online will have a time limit on when code executes, and because this is a while loop waiting for the next hour to happen, you will get a timeout while waiting for the code to run.  The best thing you can do is run it on your own machine and check that it works.

In your first one you could save 3 bytes by instead checking now in the while loop: a=@()disp('Legen... wait for it...');while floor(mod(now*86400,3600))end;disp('dary!'). You could also save a further 5 bytes by removing the a=@() bit because as-is the code constitutes a full program. The attached code also doesn't require the FTS toolbox.

How on Earth did you know about Financial Toolbox hour function? :-)

Now I see what you meant by your comment about needing intermediate variables for indexing...

C, 163 bytes
#include<time.h>
f(){puts("Legen... wait for it...");time_t t=time(0);struct tm l=*localtime(&t);while(l.tm_min+l.tm_sec)t=time(0),l=*localtime(&t);puts("dary!");}

Welcome to PPCG!

155 bytes (don't bother running it on TIO, it won't finish, it times out after one minute)

Python 3 - 92 89 bytes
from time import*;print("Legen... wait for it...");sleep(3600-time()%3600);print("dary!")

Microscript II, 45 bytes
"Legen... wait for it..."P[36s5E*sD%_]"dary!"

Finally, a use for the D instruction.
Prints the first string, repeatedly takes the UTC time in milleseconds modulo 3,600,000 until this yields 0, and then produces the second string which is printed implicitly. The 3,600,000 is represented in the code as 36x105.

Can you add an explanation? c:

@VoteToClose Done

TI-BASIC, 70 64 bytes
getTime
Disp "Legen... wait for it...
Repeat sum(getTime-Ans,1,1
End
"dary

Curse these two-byte lowercase letters!
getTime returns a three-element list {hours minutes seconds}, so the sum from the 1st element to the 1st is the hours. When there is a difference between the hours at the start and the current hours, the loop ends. Thanks to @FryAmTheEggman for this observation.

R - 97 bytes
cat('Legen... wait for it...\n')
Sys.sleep(1)
while(as.double(Sys.time())%%3600>0){}
cat('dary!')

Perl, 62 bytes
sleep -++$^T%3600+print'Legen... wait for it...
';print'dary!'

The special variable $^T (a.k.a $BASETIME) records the number seconds since epoch from when the script was started. Fortunately, leap seconds are not counted in the total, so that the following are equivalent:
print$^T%3600;
@T=gmtime;print$T[1]*60+$T[0];

Surprisingly, this variable is not read-only.

Not counting -E seems to the commonplace here, so you could save 5 bytes by using say.

From the challenge description: "You may write a program or a function." Code run from the command line is neither.

I see your point. However, the restriction to programs or functions applies to all challenges by default, yet we still allow perl -E submissions and languages that only have online interpreters.

I disagree that -E should be allowed by default. In most cases, the improvement is trivial and uninteresting, anyway.

Japt, 72 61 bytes
`{?tT?e?t(Ã?t,36e5-?w D?e%36e5,'ÜÝ!'),'Leg?... Ø2 f? ?...\n'}

Each ? represents a Unicode unprintable char. Here's how to obtain the full text:

Open the online interpreter.
Paste this code into the Code box:

Oc"`\{setTimeout(alert,36e5-new Date%36e5,'dary!'),'Legen... wait for it...\\n'}

Run the code, then erase it from the Code box.
Select the contents of the Output box and drag to the Code box. Copy-pasting will not work.
Replace the first space with a non-breaking space.
(optional) Set your computer's clock to xx:59.
Run the code.

Alternatively, here is a (hopefully reversible) hexdump:
00000000: 607b a074 548b 658c 7428 c300 742c 3336 65    `{ tT?e?t(Ã?t,36e
00000011: 352d 9a77 2044 8565 2533 3665 352c 27dc dd    5-?w D?e%36e5,'ÜÝ
00000022: 2127 293b 274c 6567 812e 2e2e 20d8 3220 66    !'),'Leg?... Ø2 f
00000033: 8e20 8a2e 2e2e 5c6e 277d                      ? ?...\n'}

This code is based on George Reith's JavaScript answer, with a few Japt-specific changes. I found out the other day that if you compress code and insert it into a backtick-wrapped string, it will automatically decompress. Here's how it's processed through compilation:
`{?tT?e?t(Ã?t,36e5-?w D?e%36e5,'ÜÝ!'),'Leg?... Ø2 f? ?...\n'}
"{setTimeout(alert,36e5-new Date%36e5,'dary!'),'Legen... wait for it...\n'}"
""+(setTimeout(alert,36e5-new Date%36e5,'dary!'),'Legen... wait for it...\n')+""

In JS, a pair of parentheses will return the last value inside; thus, this code sets the timed event, then returns the 'Legen...' string, which is automatically sent to STDOUT. Since Japt currently has no way to add content to STDOUT other than automatic output on compilation, I've instead used the vanilla JS function alert for the timed output. I hope this is allowed.

Can you post a hexdump of this?

@quartata Done. I believe it's correct.

Windows Command Script, 87 bytes
@set.=%time:~,2%&echo.Legen... wait for it...
:.
@if %.%==%time:~,2% goto:.
@echo.dary!

This continually compares an hour-variable stored at start against the current hour and succeeds if different.

Jelly,  48 47  45 bytes
-1 byte thanks to Erik the Golfer (use "Leg" as a word in the compression)
-2 thanks to caird coinheringaahing
“ÇỴġƒḃhlḂṀ⁷*Ḣ¡w*Jḷv»Ṅø3ŒTṣ”:V59_ḅ60‘œS@“dary!

Try it online! Or run a test version with a hard coded time-formatted-string of “59:57” ("mm:ss"). (Note: TIO buffers output, but local runs work as expected.)
There is, at the time of writing, only one way to access the time which is by way of a formatted string, ŒT.
This code calculates how long to wait and then sleeps. If called at hh:00:00 it waits for 3600 seconds: it converts "00:00" to [0,0] then subtracts that from 59 to yield [59,59], converts that from base sixty to give 3599, then adds one for a total wait period of 3600 seconds.
Maybe a loop could be made; or a compressed string using the whole word "Legendary" could be utilised somehow?
“ÇỴġƒḃhlḂṀ⁷*Ḣ¡w*Jḷv»Ṅø3ŒTṣ”:V59_ḅ60‘œS@“dary! - Main link: no arguments
“ÇỴġƒḃhlḂṀ⁷*Ḣ¡w*Jḷv»                          - compressed "Legen... wait for it..."
                    Ṅ                         - print z + '\n', return z
                     ø                        - niladic chain separation
                      3ŒT                     - '011' (3) time formatted string = "mm:ss"
                         ṣ”:                  - split on ':' -> ["mm","ss"]
                            V                 - eval -> [m,s]
                             59_              - subtract from 59 - > [59-m, 59-s]
                                 ḅ60          - convert from base 60 -> 60*(59-m)+(59-s)
                                    ‘         - increment -> 60*(59-m)+(59-s) = y
                                       “dary! - "dary!" = x
                                     œS@      - sleep y seconds then return x
                                              - implicit print

Use “ÇỴġƒḃhlḂṀ⁷*Ḣ¡w*Jḷv» instead of “¤ßƇṪOƭ!½ȯƤxEẹ<Ȯ¹z7⁷». Leg (from Legen) is also a word :) Also, this answer is invalid, because it depends on the minutes and the seconds both being 00. You should do something with 4ŒT instead, since there is a rule stating that, In the event that the program is started in the first second of a full hour, it should it wait for the next full hour.

Cool, "Leg" saves a byte, thanks. However, the link does work at when called at 00:00 as it is not testing for that condition - it calculates how many seconds until the next "00:00" and then waits. So it would convert "00:00" to [0,0] subtract from 59 to yield [59,59] convert that from base sixty to get 3599 and then add one to get 3600 (test it using the test version with "00:00" in place of "59:57")

Oh. It seems I can't read long Jelly code, and that I can't know everyone's uses and expectations :) Although, in the explanation, I think that 60*(59-m)+(59-s) must be 60*(59-m)+(59-s)+1 instead, the second time it appears?

No problem - the commentary isn't the clearest I've ever written.

Well, if you can't take the hassle, I can edit it in. Also, I would recommend doing x/y as left/right, and just say sleep x seconds then return y—because <dyad>@ can be defined as another dyad with swapped args.

44 bytes (I believe, I haven't tested it locally)

@cairdcoinheringaahing Thanks. The removal of @ is good, but it won't print the first string with three nilads in a row (e.g.). I also went with the minimal change and just lopped off the redundant trailing ”.

Ah, that's the bit I wasn't sure about. Jelly's nilad parsing rules can be a bit weird at times

Powershell, 52 51 bytes
-1 byte thanks @Veskah
'Legen... wait for it...'
for(;Date|% M*e){}'dary!'

This expression Date|% M*e gets value from Minute property from the Current DateTime value. The loop ends when Minute equal to 0.

You should be able to put the 'dary' directly after the braces, or at least you can in PSv5.

Befunge 98 - 69 63 bytes
 v
v>a"...ti rof tiaw ...negeL<ETB>"k,
>"EMIT"4(MS+_"!yrad"5k,@

The code contains one unprintable character (represented by <ETB> as unprintables don't seem to show up in code blocks). Its character code is 23 (an End transmission block character).
Warning: The preceding code will run in a busy loop with the stack getting bigger each repetition and thus may consume large amounts of memory.

Python, 112 bytes
import time as t;print "Legen... wait for it...";n=t.ctime();t.sleep((60-n.tm_min)*60+60-n.tm_sec);print "dary!"

Pretty self explanatory.

Can save 2 by getting rid of the spaces between the print statements and the following strings. :)

Python - 159 bytes
from datetime import*;from threading import*;p=print;n=datetime.now();p('Legen... wait for it...');Timer(3600-(n.minute*60+n.second),lambda:p('dary!')).start()

Mouse-2002, 62 bytes
Requires the user to press enter. I think.
"Legen... wait for it..."?&HOUR 1+x:(&HOUR x.=["dary"33!'0^])

Okay, well, while we're taking lots of bytes and not winning anything, let's have a little fun.
"Legen... wait for it... "?     ~ print & require keypress

&HOUR 1+ x:                     ~ get hr, add 1 and assign
(                               ~ while(1)
  &HOUR x. =                    ~ cmp current hr, stored hr
  [                             ~ if same
    #B;                           ~ backspace
    "dary"36!'                    ~ print this string and a !
    0^                            ~ exit cleanly
  ]                             ~ fi
  &MIN 59 - &ABS !              ~ get min, subtract from 59, abs & print
  ":"                           ~ record sep
  &SEC 59 - &ABS !              ~ same for second
  #B;                           ~ backspace
)
$B 8!' 8 !' 8 !' 8 !' 8 !'@     ~ backspace 5*
$                               ~ \bye

Sample:
$ mouse legend.m02
Legen... wait for it... 20:32

See, it's an updating-in-place countdown timer to the next hour! It makes good use of the while loop, which even doing nothing at all will occupy a core.

BASIC, 90 bytes
Print"Legen... wait for it...":x$=Left(Time,2):Do:Loop Until x$<>Left(Time,2):Print"dary!"

Straightforward, golfed using the type prefixes and the implicit End statement. Cost is that it works only in FreeBasic dialect fblite.

MathGolf, 39 bytes
"Legen... wait for it..."pÆt♪/╚÷▼"dary!

Try it online!
Almost beat pyth...
Explanation
Æ     ▼  Repeat the next 5 characters while false
 t       push unix time in milliseconds
  ♪/     divide by 1000
    ╚÷   check if divisible by 3600 (tio solution has 3 in its place)

"Almost"? It looks like you did.

@PatrickRoberts there's another pyth solution that's 36 bytes, couldn't quite get there even with compressed strings and other tricks.

Oh that one. It's wrong, look at the comment.

@PatrickRoberts I might fail on the "must wait one hour if run on 00:00” criterion too, but I could change it to check Unixtime in milliseconds divisible by 3600000 with the same byte count. Since the first print should take more than a millisecond, it should always work.

Vyxal o, 36 bytes
`Le₁ǐ... ʁṁ λ⟑ it...`,kḢ{:kḢ=|}`d₴⁼!

Don't Try it Online!
In the online interpreter, all output happens at once, so you can't see exactly what's happening. However, if you download and run the interpreter, you can see that it functions as expected.
Explanation:
`Le₁ǐ... ʁṁ λ⟑ it...`                # Dictionary-compressed string "Legen... wait for it..."
                     ,               # Print with newline
                      kḢ{:kḢ= }      # While the current hour hasn't changed:
                             |       #  Do nothing
                               `d₴⁼! # Dictionary-compressed string "dary!"
                                     # "o" flag - Force implicit output

Pyth - 36 bytes
Waits till the minutes is 0 with a while loop.
"Legen... wait for it..."W.d7)"dary!

You need to wait until the minutes and seconds are 0, and also wait a full hour if the program is run at :00:00

Java, 136 bytes
class a{void A(){System.out.println("Legen... wait for it...");while(System.currentTimeMillis()%3600000!=0);System.out.print("dary!");}}

How many milliseconds passed since the last full hour is the result of System.currentTimeMillis() mod 3,600,000.
The equivalent monolithic program is 159 bytes long:
interface a{static void main(String[]A){System.out.println("Legen... wait for it...");while(System.currentTimeMillis()%3600000!=0);System.out.print("dary!");}}

QBIC, 58 bytes
?@Legen... wait for it...|#Dary!|{~mid$$|(_d,4,2)=@00||_XB

Explanation
?@Legen... wait for it...|     Define string literal "Leg[..]it..." and print it
#Dary!|                        Define string B as "Dary!", but don't use it yet
{                              Opens an indefinite DO loop
~mid$$|(...)=@00|              Translates to IF MID$(...) = C$, where C$ is "00"
    The MID$ takes two characters, starting from pos 4, from the system's time (_d)
    So, if the string "11:00" has "00" starting at pos 4,
_XB                            Terminate the program and print string B
(The DO loop and the IF are closed implicitly)

C#, 119 Bytes
Golfed:
var d=DateTime.Now;Console.Write("Legen... wait for it...");while(DateTime.Now.Hour!=d.Hour+1){}Console.Write("dary!");

Only needs using System; to run - I will add this into the byte count if it's required.
Outputs:
"Legen... wait for it..."

(Still waiting for the "dary!" to appear...)

Did the "dary!" finally appear? Because I'm worried...

@Erik the Golfer It did you know! And I can tell you, it was worth the...wait! :)

Bean, 58 bytes
Hexdump:
00000000: a653 d080 a038 2080 4023 8100 35cc d420  ¦SÐ. 8 .@#..5ÌÔ
00000010: 218f 2581 0126 2381 02cc e5e7 e5ee aeae  !.%..&#..Ìåçåî®®
00000020: aea0 f7e1 e9f4 a0e6 eff2 a0e9 f4ae ae2e  ® ÷áéô æïò éô®®.
00000030: b3ae b6e5 36e4 e1f2 f921                 ³®¶å6äáòù!

Bean Interpreter
Equivalent JavaScript (66 bytes):
console.log("Legen... wait for it...")
while(new Date%36e5)"dary!"

On the Bean Interpreter, make sure not to run without Multithread enabled or you might crash your browser. If it's enabled you should have nothing to worry about though, as it runs the blocking while loop in a Web Worker.

F#, 117 bytes
let n()=System.DateTime.Now.Hour
let l=
 printfn"Legen... wait for it..."
 let o=n()
 while n()=o do()
 printf"dary!"

The brackets after the n turns it from a value into a function, so it will be re-evaluated every time it's accessed. Other than that, it's a fairly straight-forward while loop.

Pascal (FPC), 125 bytes
Uses sysutils;var t:real;begin t:=Now;writeln('Legen... wait for it...');while trunc(t*24)=trunc(Now*24)do;write('dary!')end.

Try it online! (Wait for the next minute version)
After digging through FPC's source code, I learned that return type of Now() (and Time() and Date()) is TDateTime which is the same as Double and Real and that the whole part is used for the date and the fractional part is used for the time. Multiplying Now() by 24 gives the number of hours in the whole part. The program saves the current time in t at the start and waits until the mutiplied whole part changes (by comparing truncated values).

Ruby, 66 bytes
Very straight forward, i guess
puts"Legen... wait for it...";sleep 60.*60-Time.now.min;puts:dary!

C (Windows API), 119 bytes
#include <Windows.h>
WORD s[8];main(){puts("Legen... wait for it...");do{GetLocalTime(s);}while(s[6]!=0);puts("dary!");}

SmileBASIC, 69 66 62 bytes
?"Legen... wait for it...
TMREAD OUT,M,
WAIT(60-M)*3600?"dary!

05AB1E, 34 37 bytes
”ëÃ!”2ä©н…šÏ€‡€•‚…...«ðý,[žbžc+_#}®θ,

+3 bytes because I forgot about rule "In the event that the program is started in the first second of a full hour, it should wait for the next full hour.".
Try it online (with the waiting put under a setting).
Explanation:
”ëÃ!”              # Push Titlecase dictionary word: "Legendary!"
     2ä            # Split it into two equal parts: ["Legen","dary!"]
       ©           # Save this list in the register (without popping)
н                  # Pop and only leave the first value: "Legen"
 …šÏ€‡€•           # Push three space-delimited dictionary words: "wait for it"
        ‚          # Pair them together: ["Legen","wait for it"]
         …...      # Push string "..."
             «     # Append them after each item: ["Legen...","wait for it..."]
              ðý   # Join by spaces: "Legen... wait for it..."
                ,  # Print with a trailing newline
[       }          # Start an infinite loop
 žb                #  Push the current minutes
   žc+             #  Add the current seconds
      _            #  Check if the minutes and seconds combined are exactly 0
       #           #  And if they are 0: stop the infinite loop
®                  # Push the list from the register again
 θ                 # Pop and only leave the last value: "dary!"
  ,                # Print it with trailing newline

See this 05AB1E tip of mine (section How to use the dictionary?) to understand why ”ëÃ!” is "Legendary!" and …šÏ€‡€• is "wait for it".

Japt, 38 bytes
ÈKc ªKb ªOo`ÜÝ`}fOp`Leg... Ø2 fŽ Š...

Try it online!
This program will pause the tab till the hour is reached on Shaggy's intepreter, so it is hosted on tio.
Since Shaggy did most of the work on this one, I'll try to give as best an explanation as possible.
Proof of Concept
Explanation
ÈKc ªKb ªOo`ÜÝ`}fOp`Leg�.. Ø2 fŽ Š..
È              }                                    create a function with 3 params
                f                                   and call it with the following param till falsy
                 Op`Leg�.. Ø2 fŽ Š.. print first part "Legen..
                                                    (returns undefined)
 Kc ªKb ª                                           are current minute and second falsy?
         Oo`ÜÝ`                                     If so, print ..dary!
                                                    (returns undefined, falsy)

Looking at the spec, you need 3 dots in both places in the first output and an exclamation mark at the end of the second output. And you should probably mention that Oo returns undefined, which is falsey.

CJam, 48 bytes
"Legen... wait for it...
"oet3={_et3==}g;"dary!"

Try it online! Or don't. Try this version online instead, because it only waits for the minute to change.

Pascal, 154 B
This full program requires a processor compliant with ISO standard 10206 “Extended Pascal”, in particular the time related features are necessary.
The program performs a busy wait until the hour of t differs from the hour of t0 (to save space called s).
program b(output);var t,s:timeStamp;begin
getTimeStamp(s);writeLn('Legen... wait for it...');repeat
getTimeStamp(t)until s.hour<>t.hour;write('dary!')end.

Degolfed:
program legendaryPascal(output);
    var
        start, now: timeStamp;
    begin
        getTimeStamp(start);
        writeLn(output, 'Legen... wait for it...');

        { NB: The `timeValid` test has been omitted from the golfed version. }
        repeat
        begin
            getTimeStamp(now)
        end
        until false in [start.timeValid, now.timeValid, start.hour = now.hour];

        writeLn(output, 'dary!')
    end.

See also the Delphi‑esque FreePascal submission, a non‑standardized yet popular Pascal dialect.

Swift, 119 bytes
import Foundation
puts("Legen... wait for it...")
while Calendar.current.component(.minute,from:.now)>1{}
puts("dary!")

Fairly self-explanatory. Since we're importing Foundation anyway, we can use the puts function from C instead of Swift's own print function to save 2 bytes.


text:
Thanksgiving Turkey
(Hopefully it's still Thanksgiving for you)
You got a turkey for your thanksgiving dinner but you don't know how to evenly distribute it. The problem is, some people eat more than others, so you need to find a solution
Input
There will be two inputs. The first will be an ascii art of various people.
     o
 o  \|/
\|/  |
 |   |
/ \ / \

ascii-art specifications
Each person takes up a width of 3 columns. Each person is separated by a single column of spaces. The very top of each person is an o. Below the o, offset by 1 and -1 in the x, are \ and /, respectively. From the o to the second to last row in the input are |, the amount of these per person is their "height". The only data you will need to extract from each person is their "height".

There will always be at least one person. Each person always has at least 2-height. The max height your program should handle is at least a height of 64.
If you would like the input padded with spaces to form a rectangle, please specify this in your answer.

The second input is the turkey. The turkey is not really a turkey, more of NxM dimensions of a turkey. If the second input is 3x2, then the turkey has dimensions of 3*2, with a total area of 6.
Output
The output may be a list or your language's closest alternative (e.g. Array). You may also output a string, with the values separated by spaces.
The values for each person should be output in the order in which they were input.
Challenge
Your goal is to divide the area of the turkey among the people.
An example scenario:
Assume they are two people, with heights of 3 and 6, respectively. If there is a turkey of 5x3. The total area of the turkey that will need to be distributed is 15.
Now how would you distribute it among everyone? Here's how:
                    the_persons_height
TurkeyForAPerson = -------------------- * turkey_area
                    sum_of_all_heights

This means, for the first person with a height of 3, they will get 3/9*15 turkey, or 5, the second person with a height of 6 they will get 6/9*15 or 10 turkey.
Output
Output must solely consist of digits, and ., unless you choose to go for the bonus. In that case, it may only consist of digits, spaces (), and a slash (/).
Full example
Input:
6x5
     o
     |
 o  \|/
\|/  |
 |   |
 |   |
/ \ / \

Output:
11.25 18.75

Bonuses
-20% Bonus: You output a fraction (must be simplified), it does not matter whether it is a mixed or improper fraction.
Scoring
This is code-golf so shortest code in bytes wins!

I may be missing something, but how should we separate the output for each person from the others? I.e. what exact format should the output be in?

@ETHproductions You may output in a list, or separated by spaces, I can't believe I forgot to specify that.

Is there an upper limit on the turkey dimensions? i.e. is each dimension always one digit, or could it be like 11x10 or higher?

@TomCarpenter it may be multiple digits, the upper limit is whatever your language supports

Pyth, 23 bytes
mc*vXzG\*dsN=N-/R\|C.z0

This doesn't work in the online version, because it uses eval to determine the size of the turkey.
Explanation:
mc*vXzG\*dsN=N-/R\|C.z0   implicit: z = first input line
                    .z    read all other lines
                   C      transpose them
               /R\|       count the "|"s in each column
              -       0   remove 0s in this list (columns with no "|"s)
            =N            assign the resulting list to N
m                         map each value d in N to:
    XzG\*                    replace every letter in z with a "*"
   v                         evaluate the result (does the multiplication)
  *      d                   multiply with d
 c        sN                 divide by sum(N)

LabVIEW, 67 Bytes
Im counting after what i proposed in the meta post so its not fixed but yeah here goes.

input padded with spaces is expected.
Im counting heads and get the size of people from the line where the heads are at.

Japt, 49 46 bytes
Japt is a shortened version of JavaScript. Interpreter
W=UqR y f@Y%4¥1 £Xq'| l -1)£Vq'x r@X*Y,1 *X/Wx

Outputs as an array. (Note that you will need to wrap each of the two inputs in quotation marks.)
How it works
            // Implicit: U = stick-figures, V = turkey size
W=UqR y     // Assign variable W to: split U at newlines, transpose rows with columns,
f@Y%4==1    // take each stick-figure body,
m@Xq'| l -1 // and count the number of "|"s.
)m@Vq'x     // Now map each item X in W to: V split at "x",
r@X*Y,1     // reduced by multiplication, starting at 1,
*X/Wx       // multiplied by X and divided by the total of W.
            // Implicit: output last expression

MATLAB 109*80% = 87.2 bytes
function o=f(t,p);p=char(strsplit(p,'\n'));a=sum(p(:,2:4:end)=='|');o=rats(prod(sscanf(t,'%dx%d'))*a/sum(a));

So this is a MATLAB function which takes two inputs, the first is a string for the turkey size (e.g. '8x4', and the second is the string containing the people. It returns a string containing improper fractions for each person.
This could have been a lot smaller, but the new lines got tricky. MATLAB could easily convert a string with ; as a separator for each line, but trying to use a newline proved difficult, costing 25 characters:
p=char(strsplit(p,'\n')); % Converts the input person string to a 2D array

Getting the size of the people is actually quite easy:
a=sum(p(:,2:4:end)=='|');

This takes every fourth column starting from the second (which will be all the columns where bodies of people will be), then converts that to an array containing 1's where there are body bits and 0's where there aren't. Finally it sums column-wise which results in the array a which is a 1D array containing the size of each person.
prod(sscanf(t,'%dx%d'))*a/sum(a)

Next we extract the size of the turkey from the input string which is in the form %dx%d, i.e. one number then 'x' then another number. The resulting array of two numbers are multiplied together to get turkey area.
This is multiplied by each of the peoples height, and also divided by the total height of all people to get the portion of turkey for each person as a decimal number.
rats(...)

The final step to qualify the bonus - this bit makes the code 6 characters longer, but the bonus knocks off ~22 so its worth it. rats() is a nice function which converts a decimal number to a simplified improper fraction (accurate to 13 d.p.). Feeding it an array of decimal numbers (i.e. the amount for each person) will return a single string containing fractions for each person in turn separated by spaces.
Granted the output of rats() adds more than one space, but the question doesn't say it can't - just says the string must contain only digits, ' ' and '/'.
This is the output from the example (quote marks added by me to prevent spaces being removed, not in actual output):
'     45/4          75/4     '

Example usage:
f('6x5',['     o ' 10 '     | ' 10 ' o  \|/' 10 '\|/  | ' 10 ' |   | ' 10 ' |   | ' 10 '/ \ / \'])

output:
'     45/4          75/4     '

It also works (albeit with warnings) on the online Octave interpreter. You can try it here. The link is to a workspace with the f function defined in a file already. So you should be able to just enter the example usage above at the prompt.

Pyth - 25 bytes
Can definitely golf a couple bytes off of it. Pretty straightforward approach.
KfT/R\|C.z*R*FsMcz\xcRsKK

Try it online here.

Haskell 119 bytes
import Data.List
g x=sum[1|y<-x,y>'{']
s#p|(h,_:t)<-span(<'x')s=[g x*read h*read t/g p|x<-transpose$lines p,any(>'{')x]

Usage example: "6x5" # "     o \n     | \n o  \\|/\n\\|/  | \n |   | \n |   | \n/ \\ / \\\n" -> [11.25,18.75].

JavaScript (ES6), 131 bytes
(t,p)=>eval(`h=[];for(s=0;m=r.exec(p);s++)h[i=m.index%l/4|0]=~~h[i]+1;h.map(v=>v/s*${t.replace("x","*")})`,l=p.search`
`+1,r=/\|/g)

Returns an array of portions.
Explanation
(t,p)=>                      // t = turkey equation, p = ASCII art of people
  eval(`                     // use eval to enable for loop without {} or return
    h=[];                    // h = array of each person's height
    for(s=0;m=r.exec(p);s++) // for each match of "|", s = sum of all heights
      h[i=m.index%l/4|0]=    // i = person index of this match
        ~~h[i]+1;            // increment person's height (~~ casts undefined to 0)
    h.map(v=>v/s*            // divide each height by the sum and multiply by turkey area
      ${t.replace("x","*")}  // since this is inside an eval just convert t to an equation
    )`,                      // implicit: return array of each person's portion

    // These are executed BEFORE the eval (escaping characters would mean more bytes)
    l=p.search`
`+1,                         // l = line length
    r=/\|/g                  // r = regex to match height markers
  )

Test

var solution = (t,p)=>eval(`h=[];for(s=0;m=r.exec(p);s++)h[i=m.index%l/4|0]=~~h[i]+1;h.map(v=>v/s*${t.replace("x","*")})`,l=p.search`
`+1,r=/\|/g)
Turkey = <input type="text" id="turkey" value="6x5" />

<textarea id="people" rows="8" cols="40">     o
     |
 o  \|/
\|/  |
 |   |
 |   |
/ \ / \</textarea>

<button onclick="result.textContent=solution(turkey.value,people.value)">Go</button>

Python 99 bytes
lambda a,b: [`(''.join(i)).count('|')*1.0/a.count('|')*eval(b)` for i in zip(*a.split('\n'))[1::4]]

Input:'     o \n     | \n o  \\|/\n\\|/  | \n |   | \n |   | \n/ \\ / \\','6*5'
Output: ['11.25', '18.75']

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
Simple Task Solved Thrice
You should write 3 programs and/or functions in one language.
All of these programs should solve the same task but they all should give different (but valid) outputs. (I.e. for every pair of programs their should be some input which generates different (but valid) sets of output numbers.)
The task

You are given an integer n, greater than 1
You should return or output n distinct positive integers, and none of them should be divisible by n.
The order of the numbers doesn't matter and a permutation of numbers doesn't count as different outputs.

A valid triplet of programs with some input => output pairs:
program A:
    2 => 5 9
    4 => 5 6 9 10
    5 => 2 4 8 7 1

program B:
    2 => 1 11
    4 => 6 9 1 2
    5 => 4 44 444 4444 44444

program C (differs only in one number from program B):
    2 => 1 13
    4 => 6 9 1 2
    5 => 4 44 444 4444 44444

Scoring

Your score is the sum of the lengths of the 3 programs or functions.
Lower score is better.
If your programs/functions share code, the shared code should be counted into the length of every program that uses the code.

Does each program have to be able to be run from its own file without any includes, or can the programs depend on some shared module/library that is only counted once?

@quintopia The programs/functions should not share code. If they do, the shared code should be counted into the length of all programs that use the code.

Pyth, 17 16 bytes
5 bytes:
^LhQQ

Outputs:
2: [1, 3]
3: [1, 4, 16]
4: [1, 5, 25, 125]

6 bytes:
mh*QdQ

Outputs:
2: [1, 3]
3: [1, 4, 7]
4: [1, 5, 9, 13]

5 bytes:
|RhQQ

Outputs:
2: [3, 1]
3: [4, 1, 2]
4: [5, 1, 2, 3]

Alternate version, in increasing order: -ShQQ

Ooh. I like that third scheme.

@isaacg oh, sorry

J, 16 bytes
Function 1, 5 bytes
p:^i.

Function 2, 6 bytes
+p:^i.

Function 3, 5 bytes
>:^i.

How it works
Function 1
p:^i.     Right argument: y

   i.     Compute (0 ... y-1).
p:        Compute P, the prime at index y (zero-indexed).
  ^       Return all powers P^e, where e belongs to (0 ... y-1).

Since P is prime and P > y, y cannot divide Pe.
Function 2
+p:^i.    Right argument: y

 p:^i.    As before.
+         Add y to all results.

If y divided Pe + y, it would also divide Pe + y - y = Pe.
Function 3
>:^i.     Right argument: y

   i.     Compute (0 ... y-1).
>:        Compute y+1.
  ^       Return all powers (y+1)^e, where e belongs to (0 ... y-1).

If y divided (y+1)e some prime factor Q of y would have to divide (y+1)e.
But then, Q would divide both y and y+1 and, therefore, y + 1 - y = 1.

Dyalog APL, 16 17 bytes
1+⊢×⍳

⊢+1+⊢×⍳

1+⊢*⍳

Vitsy, 54 bytes
Programs:
V1V\[DV*1+N' 'O1+]
V2V\[DV*1+N' 'O1+]
V3V\[DV*1+N' 'O1+]
Outputs:
2 => 3 7
4 => 5 9 13 17
5 => 6 11 16 21 26
2 => 5 7
4 => 9 13 17 21
5 => 11 16 21 26 31
2 => 7 9
4 => 13 17 21 25
5 => 16 21 26 31 36
How it works (using the first program as the explanation):
V1V\[DV*1+N' 'O1+]
V                  Capture the implicit input as a final global variable.
 1                 Push one to the stack for later use.
  V\[            ] Do everything in the brackets input times.
     D             Duplicate the top item of the stack.
      V            Push the global variable to the stack.
       *1+         Multiply, then add 1. This makes it non-divisible.
          N' 'O    Output the number followed by a space.
               1+  Add one to the number left in the stack.
Try it online!

CJam, 8 + 8 + 8 = 24 bytes
{,:)))+}
{_,f*:)}
{)_(,f#}

These are three unnamed functions which expect n to be on the stack and leave a list of integers in its place. I'm not sure this is optimal, but I'll have to hunting for a shorter solution later.
Test suite.
Results:
{,:)))+}
2 => [1 3]
3 => [1 2 4]
4 => [1 2 3 5]
5 => [1 2 3 4 6]

{_,f*:)}
2 => [1 3]
3 => [1 4 7]
4 => [1 5 9 13]
5 => [1 6 11 16 21]

{)_(,f#}
2 => [1 3]
3 => [1 4 16]
4 => [1 5 25 125]
5 => [1 6 36 216 1296]

The first one also works as
{_),:)^}

or
{_(,+:)}

your Results show all three giving the same output when n=2

@Sparr That's allowed. Check the examples in the challenge. The only requirement is that they compute different functions, not different results on every input.

Ahh, they have to have different results on some input. That's what I misread.

Perl, 79
One char added to each program because this requires the -n flag.
for$a(0..$_-1){say$_*$a+1}
for$a(1..$_){say$_*$a+1}
for$a(2..$_+1){say$_*$a+1}

Fairly straightforward.

Mathematica, 12 + 12 + 12 = 36 bytes
# Range@#-1&
# Range@#+1&
#^Range@#+1&

Tests:
# Range@#-1&[10]
(* -> {9, 19, 29, 39, 49, 59, 69, 79, 89, 99} *)
# Range@#+1&[10]
(* -> {11, 21, 31, 41, 51, 61, 71, 81, 91, 101} *)
#^Range@#+1&[10]
(* -> {11, 101, 1001, 10001, 100001, 1000001, 10000001, 100000001, 1000000001, 10000000001} *)

Could you add some example outputs?

Python 2, 79 bytes
lambda n:range(1,n*n,n)
lambda n:range(1,2*n*n,2*n)
lambda n:range(1,3*n*n,3*n)

Three anonymous function that start at 1 and count up by each of n, 2*n, 3*n for n terms.

Haskell, 50
f n=n+1:[1..n-1]
f n=1:[n+1..2*n-1]
f n=[1,n+1..n^2]

Examples:
 f1 5=[6,1,2,3,4]
 f2 5=[1,6,7,8,9]
 f3 5=[1,6,11,16,21]

Python 2, 125 bytes
N=input();print[i*N+1for i in range(N)]
N=input();print[i*N+1for i in range(1,N+1)]
N=input();print[i*N+1for i in range(2,N+2)]

Each line here is a complete program. The most obvious solution in my mind.
EDIT @Sherlock9 saved two bytes.

Seriously, 20 bytes
,;r*1+

,;R*1+

,;R1+*1+

Yeah, this isn't optimal...

Par, 16 bytes
The custom encoding, described here, uses only one byte per character.
✶″{*↑                   ## 3 => (0 1 2) => (0 3 6)  => (1 4 7)
✶″U{ⁿ↑                  ## 3 => (1 2 3) => (3 9 27) => (4 10 28)
✶U¡↑◄                   ## 3 => (1 2 3) =>             (1 2 4)

Outputs
2 => (1 3)
3 => (1 4 7)
4 => (1 5 9 13)
5 => (1 6 11 16 21)

2 => (3 5)
3 => (4 10 28)
4 => (5 17 65 257)
5 => (6 26 126 626 3126)

2 => (1 3)
3 => (1 2 4)
4 => (1 2 3 5)
5 => (1 2 3 4 6)

Haskell, 54 bytes
f n=n+1:[1..n-1]
g n=5*n+1:[1..n-1]
h n=9*n+1:[1..n-1]

These three functions are pretty straightforward so…

Octave, 11 + 13 + 13 = 37 bytes
@(a)1:a:a^2
@(a)a-1:a:a^2
@(a)(1:a)*a+1

Golfscript, 50 51 57 bytes
A Golfscript version of what used to be quintopia's Python code. Each function takes n off the stack.
{.,{1$*)}%\;}:f;    i*n+1 for i in range(n)
{.,{)1$*)}%\;}:g;   i*n+1 for i in range(1,n+1)
{.,{1$)\?}%\;}:h;   (n+1)**i for i in range(n)

TI-Basic (TI-84 Plus CE), 55 40 bytes total
PRGM:C 12 bytes
    seq(AnsX+1,X,1,Ans

PRGM:B 14 bytes
    seq(AnsX+1,X,2,Ans+1

PRGM:C 14 bytes
    seq(AnsX+1,X,3,Ans+2

Simple, similar to many other answers here, each displays a list of the numbers (X+A)N+1 for X in range(N) and with A being which program  (1, 2, or 3).
Old solution (55 bytes):
PRGM:C 17 bytes
    Prompt N
    For(X,1,N
    Disp XN+1
    End

PRGM:B 19 bytes
    Prompt N
    For(X,2,N+1
    Disp XN+1
    End

PRGM:C 19 bytes
    Prompt N
    For(X,3,N+2
    Disp XN+1
    End

Simple, similar to many other answers here, each displays the numbers (X+A)N+1 for X in range(N) and with A being which program  (1, 2, or 3).

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
What is that angle?
The goal of this challenge is to determine the angle of a line in a image.
Rules on the image:

The image background will be white (#FFFFFF)
The stroke of the line will be black (#000000)
The line will NOT be anti-aliased
The image will be 100x100 pixels
The line will start at the center of the image
The line will start pointing down (6-OClock)
The line will be 50 pixels long
The angle of the line will be measured going counterclockwise from the starting position
The image codec will be either .jpg or .png

Input format will be a file name passed by the command line arg, script input, or function arg. Output format is simple - just output the number of degrees (e.g. 90).
Answers can be ±1 degree of the stated measure. Here are a few example images:

A reference image at 45 degrees with gray background

0 degrees

45 degrees

50 degrees

130 degrees

230 degrees

324 degrees
Here is the code used to create the images (this is coded with Processing):
int deg = 45;

int centX = width/2, centY = height/2;

background(255);
noSmooth();
line(centX,
     centY,
     centX + sin(radians(deg))*50,
     centY + cos(radians(deg))*50);

saveFrame("line-"+deg+".png");// image codec can be changed here. use '.png' or '.jpg'

Did I get a downvote? If so could the voter explane why?

Can we just display it, not save it to a file?

Sure, that's how all the other answers do it. Just print to the console the answer your program generates.

@JAtkin I wouldn't worry about downvotes on a generally upvoted post. c: We all get that.

Oh, I see. I wonder why I got one though...

Pyth - 28 26 bytes
Uses same sort of brute force strategy as the js answer.
f!@F+]'zm+50s*48.t.tT7d_U2

Takes input as filename from stdin.
f                     Filters from 1 till predicate is matched
 !                    Boolean not so that only pixel with zero value matched
  @F+]                Folds by indexing to get pixel value
   'z                 Reads image filename input
   m         _U2      Maps over both trig ratios
    +50               Adds 50 to pixel value
     *48              Multiplies pixel value by 48
      .t    d         Takes trig ratio with appropriate option
        .t 7          Degrees to radians
          T           Filter var

Wow, this is cool but I don't speak pyth. Would you mind adding an explanation?

I wish JavaScript would have the same byte count on the other hand.

@insertusernamehere I wish groovy or scala could do this kind of golfing as well.

@JAtkin explanation added. Feel free to message me on chat if you have any questions.

JavaScript (ES6), 225 227 244 bytes
Let's get the ball rolling:
f=s=>{(i=new Image).src=s;c=document.createElement`canvas`.getContext`2d`;c.drawImage(i,0,0,100,100);for(a=360;a--,r=a/180*(m=Math).PI;)if(!c.getImageData(50+48*m.cos(r),50+48*m.sin(r),1,1).data[1]){alert((450-a)%360);break}}

Simply pass the URL of the image to the function:
f('90deg.png');

Alerts degrees within the ±1 range. Passed all test cases.
Ungolfed
f=s=>{
    // create new image and set source
    (i=new Image).src=s;
    // create canvas and get context
    c=document.createElement`canvas`.getContext`2d`;
    // set width/height to 100px and draw image on canvas
    c.drawImage(i,0,0,100,100);
    // check whether for any degree on the theoretical circle a black pixel is found
    for(a=360;a--,r=a/180*(m=Math).PI;)
        if(!c.getImageData(50+48*m.cos(r),50+48*m.sin(r),1,1).data[1]){
            // wait, it should be ccw and the board is rotated 90 degrees
            alert((450-a)%360);
            break
        }
}

Edits

Saved 17 bytes – figured I don't need to set the width and height of the canvas element.
Saved 2 bytes by negating the condition.

I think this should work (haven't tested it). 206 bytes: s=>{(i=new Image).src=s;with(Math)with(document.createElement\canvas`.getContext`2d`)for(drawImage(i,0,0,100,100),a=360;r=--a/180PI;)getImageData(50+48cos(r),50+48*sin(r),1,1).data[1]||alert((450-a)%360)}`

This code works because you are lucky. The canvas will be tainted almost everytime. Specially with file://. You need to set the crossOrigin property. Also, it won't work if the image loading takes 0.00001 seconds more than creating the canvas does. Also, you don't need the f=, cutting off 2 bytes. But it is a nice solution indeed!!! My upvote for it.

@IsmaelMiguel Thanks for your detailed feedback. You're right about the canvas. In the beginning I tried to rotate and mirror the image, so that the angle doesn't need to be transformed. You can say good-bye to that! Got blurry, couldn't find the right pixel. I've skipped the onload part as I was undercut in another challenge because of that. So I thought it's ok to assume that it loads fast enough. Regarding the anonymous function I'm not sure how to count it. If I cut off f= and I want to invoke it I have to wrap it in () like (s=>{})('arg');. Can I ignore this in byte count?

@insertusernamehere Yeah, you can ignore the byte count. But you have to specify that it is an anonymous function

Matlab, 118 104 bytes
I generate a matrix of the same size as the image with complex numbers (0 in the center) and exctract from that matrix the values which are on the line. The argument of the mean of those is then displayed.
Thanks to @ThomasKwa for suggesting an improvement in accuracy which also resulted in shorter code!!!
I=imread(input('','s'));
[y,x]=ndgrid(-50:49);
c=y+i*x;
disp(mod(angle(mean(c(~I(:,:,1))))*180/pi+360,360))

Would it be shorter to find the argument of the mean of all of the points on the line?

Wow, this is far shorter than I expected answers to be, nice job!

@ThomasKwa Absolutely, but then it would not be as accurate, as the pixels close to the center are absolutely inaccurate. If you want to try, you can run this code in Octave too, I think!

Argument of the mean (which should give the argument of the center of the line to a pretty good accuracy), not mean of the arguments. I don't know if the accuracy would be acceptable.

@JAtkin Thanks! That was a nice just-before-going-to-bed challenge=P

@ThomasKwa Great idea, thanks! The accuracy is even better now and the code is a few bytes shorter=)

Matlab,  86 77 bytes
Here's another way using Matlab:
[I,J]=find(~im2bw(imread(input('','s'))));mode(mod(round(atan2d(J-51,I-51)),360))

This reads the file (stolen from flawr), and finds the indices of the black pixels. Then, it works out the vector that points from the centre of the image to each black pixel, and uses atan2d to find the angle, rounding to get integer angles, and doing mod(...,360) to get results in the right range. To get the correct angle (there is a bit of error for the pixels close to the centre), take the most commonly calculated angle.
Thanks to slvrbld for the im2bw suggestion!

Your code can be reduced to 77 bytes by replacing the part before mode(...) with [I,J]=find(~im2bw(imread(input(''))));

Nice one! Thanks I was sure there was a way to do that more easily but couldn't remember it.

Labview, 10098 Bytes
Let's put another labview code out there.
Since there is no official way to count bytes in labview i use the size of the file when saved. Alternatively counting every wire and function as 1and the case as 2 it would come out to 71.

Load image, flatten to 1D, scan for 0s from both sides and take the first, calc back to point and use geometry to get angle.

Nice, this is interesting. You may want to ask on meta how to score labview programs.

there already is a thread on how to score but unfortunatly there is no answer yet

Oh, I see. I just edited your post to make the byte count more understandable to us in the US of A.

@JAtkin As a european fellow it made me scratch my head, wondering how he got those fractions of byte. Wouldn't using a space please all sides?

Hehehe, I forgot you guys have , for decimal places.

I have edited your post to use a space bar instead of the comma. I also edited the capitalisation because my edit will only get accepted if it is more than 6 characters.


text:
Which is the closest train station?
Goal
Write a full program that generates a map showing the local train stations and which train station is the closest to every point on the map.
Requirements
Input
A set of tuples.  The first is the (Width,Height) dimensions of the map.  The following tuples are the (X,Y) coordinates of each train station.  Coordinates are 0-based (ie the top-left corner of the map is (0,0))  The input may be taken in any reasonable format (string, int array, tuple array, etc.)
Assume:

The map has a positive width and height.
All train stations are inside the map.
There are between 1 and 26 train stations, inclusive.

Output
Write a rectangular output to the console.
The first train station is designated A, the second B and so on.  Train stations should be shown with their upper-case letter.
Every other cell contains the lower-case letter of the closest train station.  Where there is a draw, travel to the station with the earliest letter (ie. choose B over C if they have a draw.)
Distance is measured in taxi-cab distance: Δx + Δy
Example
Input
6,4 1,0 4,1 3,3

Output
aAaabb
aaabBb
aaccbb
cccCcc

Scoring
After one week, the source code in the least bytes wins.

@steveverrill No it was using the Manhattan distance too.

@flawr, agreed.  I would never have thought to search for that term.  I'll close this.


text:
Adjacent Letter Test
One aspect of password strength testing is runs of adjacent letters on the keyboard. In this challenge, a program must be created that returns true if a string contains any runs of adjacent letters.
What counts as a run of adjacent letters?
For this simplified version of a password strength tester, a run of adjacent characters is 3 or more letters which are next to each other in a single direction (left, right, above or below) on a QWERTY keyboard. For the purpose of this challenge the layout of the keyboard looks like this:
1234567890
QWERTYUIOP
ASDFGHJKL
ZXCVBNM

In the diagram above Q is below 1 but not below 2, so a string that contains 1qa or aq1 anywhere inside it would make the program return true, but 2qa would not.
Input
The password string to check. It will only contain the characters [0-9a-z] or [0-9A-Z] (your choice).
Output
The program must return a truthy value if the password contains one or more runs of adjacent keys, or falsey if it contains none.
Examples
The following inputs should output true:

asd
ytrewq
ju7
abc6yhdef

And these inputs should output false:

abc
aaa
qewretry
zse
qwdfbn
pas

Rules

Answers may be complete programs or functions.
Standard loopholes are disallowed.
This is code-golf, lowest score (in bytes) wins!

Duplicate of http://codegolf.stackexchange.com/questions/48406/is-the-word-typeable-with-keys-adjacent-to-each-other?

Pyth - 66 62 60 bytes
Pretty straightforward approach. Checks if any of substrings len 3 are in any of the rotations of the keyboard. Will be using base encoding for keyboard.
.E}Rjb+J+Kc+jkS9"0
qwertyuiop
asdfghjkl
zxcvbnm"b.tKN_MJ.:z3

Test Suite.

@user81655 fixed, and saved two bytes.

Japt, 78 bytes
Japt is a shortened version of JavaScript. Interpreter
V=1oA ¬+`0\nqØÆyuiop\n?dfghjkl \nzxcvbnm`;1+¡Y©(((VbX -VbUgY-1)-5 a -5 %A a)bB

Outputs 0 for falsey cases; otherwise, a positive integer. The ? should be replaced with the unprintable Unicode char U+0086, or if you don't want to go to all that trouble, just as.
How it works
V=1oA q +"0\nqwertyuiop\nasdfghjkl \nzxcvbnm";1+Um@Y&&(((VbX -VbUgY-1)-5 a -5 %A a)bB
           // Implicit: U = input string
V=1oA q    // Set variable V to the digits 1-9, plus
+"...";    // this string.
Um@        // Take U and map each character X and its index Y with this function:
Y&&        //  If Y is 0, return Y; otherwise,
VbX -      //  take the index of X in V, subtract
VbUgY-1    //  the index of (char at position Y - 1 in U) in V,
-5 a -5    //  subtract 5, take the absolute value, subtract 5 again,
%A a       //  take modulo by 10, then take the absolute value.
           //  This returns 1 for any pair of characters that is adjacent
           //  within V, horizontally or vertically.
bB +1      // Take the index of 11 in the result and add one.
           // Implicit: output last expression

C#, 227
int h(string k){var q="1234567890,QWERTYUIOP,ASDFGHJKL,ZXCVBNM,1QAZ,2WSX,3EDC,4RFV,5TGB,6YHN,7UJM,8IK,9OL,";int i=0,j=0;for(;i<k.Length-2;i++)if((q+String.Concat(Enumerable.Reverse(q))).Contains(k.Substring(i,3)))j=1;return j;}

0 is falsey, 1 is truthy.
Concatenated all keys horizontal and vertical, and reversed, and checks if any of 3 chars of input is contained within.
C# is really verbose, gotta dive into other languages :(

PHP, 173+1 bytes
while(~$argn[$i+2])($p=preg_match)($r=_.join(".{10}",str_split(($t=substr($argn,$i++,3))))."|$t"._,$d=_1234567890_qwertyuiop_asdfghjkl__zxcvbnm)||$p($r,strrev($d))?die(1):0;

Run as pipe with -nR with lowercase input or try it online.

Clojure, 156 bytes
#(some(set(for[R[["1234567890""QWERTYUIOP""ASDFGHJKL.""ZXCVBNM..."]]R[R(apply map list R)]r R p(partition 3 1 r)p((juxt seq reverse)p)]p))(partition 3 1 %))

This was a quite interesting task to implement.