-
-
Save 0x0dea/416f982ff025497982ec to your computer and use it in GitHub Desktop.
Advent of Code, Day 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HAI 1.4 | |
CAN HAS STRING? | |
I HAS A input, GIMMEH input | |
I HAS A floor ITZ 0 | |
IM IN YR elevator UPPIN YR i TIL BOTH SAEM i AN STRING IZ LEN YR input MKAY | |
STRING IZ AT YR input AN YR i MKAY, WTF? | |
OMG "(", floor R SUM OF floor AN 1, GTFO | |
OMG ")", floor R DIFF OF floor AN 1, GTFO | |
OIC | |
IM OUTTA YR elevator | |
VISIBLE floor | |
KTHXBYE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HAI 1.4 | |
CAN HAS STRING? | |
I HAS A input, GIMMEH input | |
I HAS A floor ITZ 0 | |
IM IN YR elevator UPPIN YR i TIL BOTH SAEM i AN STRING IZ LEN YR input MKAY | |
STRING IZ AT YR input AN YR i MKAY, WTF? | |
OMG "(", floor R SUM OF floor AN 1, GTFO | |
OMG ")", floor R DIFF OF floor AN 1, GTFO | |
OIC | |
BOTH SAEM floor AN -1, O RLY? | |
YA RLY, VISIBLE SUM OF i AN 1, GTFO | |
OIC | |
IM OUTTA YR elevator | |
KTHXBYE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment