# Challenge description

On some channels on a popular streaming site twitch.tv a common message people tend to spam in chats to bait people into spamming "LUL" is

One more LUL and I'm out


LUL is a popular emote used to express that something funny happened on stream.

Soon dank memes showed their potential and a parody of the copy-pasta ensued:

One more "One more LUL and I'm out" and I'm out


Which is the same message nested in itself. Given a non-negative integer N, output the LUL-pasta nested N times in itself following the pattern below.

Standard rules apply, the shortest code in bytes wins.

# Sample input / output

0: One more LUL and I'm out
1: One more "One more LUL and I'm out" and I'm out
2: One more "One more "One more LUL and I'm out" and I'm out" and I'm out
...
7: One more "One more "One more "One more "One more "One more "One more "One more LUL and I'm out" and I'm out" and I'm out" and I'm out" and I'm out" and I'm out" and I'm out" and I'm out


# Notes

• Capitalization must be preserved
• Your code may be a full program or a function
• Instead of printing, you may return a string or its equivalent in your language of choice
• You may index from 1 instead of 0
• can I add " in the start and end too? – Rod Jan 19 '17 at 11:44
• @Rod: No, you cannot. – shooqie Jan 19 '17 at 12:07
• The title of this challenge is very awkward for Dutch speakers... – user34409 Jan 19 '17 at 14:12
• @Pakk But it's true. I see a LUL, and I'm outta here... – steenbergh Jan 19 '17 at 14:20
• This can be extended to YOLO: You Only YOLO once --> YOYOLOO. You Only YOYOLOO Once --> YOYOYOLOOO, etc. – DJMcMayhem Jan 19 '17 at 16:07

# Python 2, 56 bytes

lambda x:('"One more '*x+'LUL'+' and I\'m out"'*x)[1:-1]


Try it online!
It is 1-indexed

• I assume the [1:-1] at the end trims the double quotes at the start and end? – Nzall Jan 19 '17 at 13:13
• @Nzall Precisely – Rod Jan 19 '17 at 13:15
• For x=0 this gives 'U', but should give "One more LUL and I'm out". – Wolfram Jan 19 '17 at 14:30
• @Wolfram It is 1-indexed, added this info to the answer – Rod Jan 19 '17 at 14:36

# JavaScript, 575654 52 bytes

f=q=>One more ${q?"${f(q-1)}":"LUL"} and I'm out


Test Snippet:

f=q=>One more ${q?"${f(q-1)}":"LUL"} and I'm out
<input type=number min=0 oninput=o.textContent=f(+this.value)>

<p id=o>

For some reason the snack snippet is being buggy when the input is 0, but this works otherwise. Call it like f(4).

### Explanation

f=q=>                      //declares a function f with argument q
One more ... and I'm out //hardcoded string
${q?"${f(q-1)}":"LUL"}  // does recursion based on q
// if q is true, ie not 0, recurse
// else return "LUL"

• First off input is an invalid HTML attribute, might wanna remove that. Secondly, it's because it takes the input as a string, not a number. So "0" is truthy while 0 is falsy. Easiest way to handle that is to put a + in front of this.value when you're passing it. – Patrick Roberts Jan 19 '17 at 14:58
• @PatrickRoberts Thanks, I don't know why I have an extra input field :) – Kritixi Lithos Jan 19 '17 at 15:01
• Nice, I probably would've tried using .replace. – ETHproductions Jan 19 '17 at 16:49
• Stack overflows when number is negative. – programmer5000 Apr 6 '17 at 12:10
• @programmer500 The input number is given to be non-negative so that is not a problem – Kritixi Lithos Apr 6 '17 at 14:37

# Befunge, 91 bytes

&:00p10p>"tuo m'I dna "1v
09p00-1<^g09p01-1_v#:g0<<vg
>>00g:#^_$>:#,_@ >$"LUL">" erom enO"


Try it online!

This is a breakdown of the source code with the various component parts highlighted.

We start by reading the repeat count N, and storing two duplicates of it in memory.
We then countdown the first N, pushing multiple copies of " and I'm out" onto the stack in reverse. Each additional copy is separated from the one before with a quote. The quote is generated with the sequence 90g (basically reading a copy from the first line of the source), since that's the shortest way to do so.
Once this first loop is complete, we push "LUL" onto the stack (technically this is in reverse, but it obviously makes no difference when it's a palindrome).
Then we have another loop, wrapping across the right border, over to the left of playfield, and then back again. This time we're counting down the second N, pushing multiple copies of "One more " onto the stack (again in reverse). And again, each additional copy is separated from the one before with a quote.
Once the second loop is complete, the entire phrase is now on the stack (in reverse), so we simply need to write it out.

• Nice use of get to push a ". Thanks for the explanation – MildlyMilquetoast Jan 19 '17 at 21:07

# 05AB1E, 30 29 bytes

…LULIF“"One€£ ÿ€ƒ I'm€Ä"“}}¦¨


Try it online!

Different string-types doesn't seem to mix well, so for some reason I need to end the loop twice.

# C++, 118 + 16 = 134 bytes

auto L(int x){std::string k="One more LUL and I'm out",r=k;for(int i=0;i++<x;)r.replace(i*10-1,3,'"'+k+'"');return r;}


#include<string> - +16

replaces "LUL" to the whole string N times.

Anyone has better golfs?

Try it online!

Massive thanks to Kritixi Lithos and hvd, for, uh, Massive help.

• @Kritixi Now it has a snippet. – Matthew Roh Jan 19 '17 at 12:42
• This is shorter. And I think you might need to include the <string> import statement into the bytecount, not sure – Kritixi Lithos Jan 19 '17 at 12:47
• Also you can change the for(int i=0;i<x;i++) to for(int i=0;i++<x;) – Kritixi Lithos Jan 19 '17 at 12:50
• Additionally, r.find("L") is shorter than r.find("LOL") by 2 bytes :) – Kritixi Lithos Jan 19 '17 at 12:57
• Recursive version: Try it online! Also you can use the header and footer on TIO for additional stuff, and then only count your code in the byte count. – nmjcman101 Jan 19 '17 at 18:35

# Javascript (ES6), 68 Bytes

f=(x,y="LUL")=>~x?f(--x,"One more ${y} and I'm out"):y.slice(1,-1)  Call like f(n). You can also call it like f(n, "LUL") and replace LUL with any word you wish. • Since the question asks for just "LUL", you could probably eliminate the flexibility of changing the text and golf out some bytes. Nice solution anyway, +1 – Farhan Anam Jan 22 '17 at 8:20 • @FarhanAnam I thought this was a good starting post that I would then edit, but after I posted I saw someone had posted a better answer and no matter how hard I tried to golf it I always ended up on their answer. So I thought I should just leave it here with the flexibility so that someone has some fun with it. – user64039 Jan 23 '17 at 9:43 # V, 39 37 bytes Two bytes with the help of @KritixiLithos for coming up with the substitution method iOne more LUL and I'm outÀñÓLUL/"."  Try it online! Hexdump: 00000000: 694f 6e65 206d 6f72 6520 4c55 4c20 616e iOne more LUL an 00000010: 6420 4927 6d20 6f75 741b c0f1 d34c 554c d I'm out....LUL 00000020: 2f22 122e 22 /".."  # Java, 79 77 bytes Golfed: String f(int l){return"One more "+(l<1?"LUL":'"'+f(l-1)+'"')+" and I'm out";}  Ungolfed, with test: public class OneMoreLulAndImOut { public static void main(String[] args) { OneMoreLulAndImOut obj = new OneMoreLulAndImOut(); for (int i = 0; i < 8; ++i) { System.out.println(Integer.toString(i) + ": " + obj.f(i)); } } String f(int l) { return "One more " + (l < 1 ? "LUL" : '"' + f(l - 1) + '"') + " and I'm out"; } }  Program output: 0: One more LUL and I'm out 1: One more "One more LUL and I'm out" and I'm out 2: One more "One more "One more LUL and I'm out" and I'm out" and I'm out 3: One more "One more "One more "One more LUL and I'm out" and I'm out" and I'm out" and I'm out 4: One more "One more "One more "One more "One more LUL and I'm out" and I'm out" and I'm out" and I'm out" and I'm out 5: One more "One more "One more "One more "One more "One more LUL and I'm out" and I'm out" and I'm out" and I'm out" and I'm out" and I'm out 6: One more "One more "One more "One more "One more "One more "One more LUL and I'm out" and I'm out" and I'm out" and I'm out" and I'm out" and I'm out" and I'm out 7: One more "One more "One more "One more "One more "One more "One more "One more LUL and I'm out" and I'm out" and I'm out" and I'm out" and I'm out" and I'm out" and I'm out" and I'm out  • You can change both "\"" to '"' (single chars) to save 2 bytes. – Kevin Cruijssen Jan 20 '17 at 8:04 • @KevinCruijssen thanks, I knew there was something I missed. – user18932 Jan 20 '17 at 15:26 # Python, 79 bytes I just wanted to do a recursive solution, even though it's longer than other answers. x='"One more %s and I\'m out"' f=lambda n,s=x:n and f(n-1,s%x)or(s%"LUL")[1:-1]  Try it online ## C#, 125 bytes n=>{string f="One more {0} and I'm out",s=f;for(int i=0;i++<n;)s=string.Format(s,$"\"{f}\"");return string.Format(s,"LUL");};

• I wonder if you can use string interpolation instead of Format... – Bob Jan 20 '17 at 0:55
• Change string to var to save two bytes. – devRicher Jan 20 '17 at 7:06
• @devRicher Can't because I'm declaring 2 variables – TheLethalCoder Jan 20 '17 at 9:08
• @Bob I'm already using it, not sure if I can use it elsewhere – TheLethalCoder Jan 20 '17 at 9:09
• Whoops, I didn't notice, sorry. – Bob Jan 20 '17 at 9:33

# C, 140 111 bytes

My first attempt at a golfing question.. Golfed:

#define F printf(
#define P 1&&putchar(34)
int a=0;void q(n){a=a?a:n,n?n>0?F"One more "),n-P:n?n+P,F" and I'm out"):0:F"LUL"),n+a?q(n-1):0;}


I have come to realise is the wrong output since q(0) just gives LUL. The next attempt:

#define o(Q) O(Q,n?34:0);
#define O printf
void q(int n){o("One more %c")n?q(n-1):O("LUL"),o("%c and I’m out")}


Example program (tested with GCC on OSX):

#define o(Q) O(Q,n?34:0);
#define O printf
void q(int n) {o("One more %c")n?q(n-1):O("LUL"),o("%c and I’m out")}

int main() {
q(0),putchar('\n');
q(1),putchar('\n');
q(2),putchar('\n');
q(3),putchar('\n');

return 0;
}


Gives output

One more LUL and I’m out
One more "One more LUL and I’m out" and I’m out
One more "One more "One more LUL and I’m out" and I’m out" and I’m out
One more "One more "One more "One more LUL and I’m out" and I’m out" and I’m out" and I’m out


# Mathematica, 69 68 bytes

Thanks to Martin Ender for saving 1 hard-to-find byte!

""<>Nest[{q="\"",{"One more ",#," and I'm out"},q}&,"LUL",#+1][[2]]&


Unnamed function taking a nonnegative integer argument and returning a string. Nest applies a function repeatedly to an initial argument; in this case, the function is to surround its argument by the appropriate words and quotation marks. We start from "LUL" and iterate N+1 times; that results in unwanted quotation marks enclosing the entire phrase, but [[2]] keeps only the stuff between them. At the end, ""<> turns the resulting heavily nested list into a single string.

Previous submission:

""<>Nest[{o,q="\"",#,q,a}&,{o="One more ","LUL",a=" and I'm out"},#]&

• Managed to shave off a byte by starting from LUL: ""<>Nest[{q="\"",{"One more ",#," and I'm out"},q}&,"LUL",#+1][[2]]& – Martin Ender Jan 20 '17 at 12:17
• Aha! [[2]]! That's how to get around those first undesired quotes :D – Greg Martin Jan 20 '17 at 18:15

## C#, 11985 71 bytes

string m(int n)=>$"One more {(n<1?"LUL":$"\"{m(--n)}\"")} and I'm out";


Saved 14 bytes thanks to @Luc

• Looks like it works (via LINQPad). Nice. Nested interped strings does sound a bit iffy, but it looks like it chokes on the ternary first. – Bob Jan 20 '17 at 9:40
• @Bob the problem I'm having trying to get it to work is because of the quotes, or at least that is what I think is causing it so I can't seem to remove the first string.Format and nest them – TheLethalCoder Jan 20 '17 at 9:43
• How about $"One more {(n<1?"LUL":$"\"{m(--n)}\"")} and I'm out" – Luc Jan 20 '17 at 17:03
• @Luc did you try that? Cos I'm sure I did something similar and it didn't work. On my phone right now so can't test – TheLethalCoder Jan 20 '17 at 17:30
• You can in any case replace string.Format with + to get 73 chars: – Chris F Carroll Jan 21 '17 at 6:00

## Retina, 51 bytes

.+
$*00LUL1$&$* 0 "One more 1 and I'm out" ^"|"$



Try it online!

## R, 97 bytes

function(n){s="One more LUL and I'm out";while(n){s=sub("LUL",paste0('"',s,'"'),s);n=n-1};cat(s)}


Ungolfed:

function(n) {
s = "One more LUL and I'm out";
while(n) {
s = sub("LUL", paste0('"', s, '"'), s);
n = n - 1
};
cat(s)
}


## R, 100 97 92 bytes

"One more recursive function and I'm out"

f=function(n)paste("One more",if(n<1,"LUL",paste0('"',f(n-1),'"')),"and I'm out");cat(f(scan()))


Edit: Turns out that a non-recursive approach is slightly shorter:

x="One more ";y=" and I'm out";cat(x,rep(c('"',x),n<-scan()),"LUL",rep(c(y,'"'),n),y,sep="")


# Japt, 39 bytes

Thank you @ETHproductions for helping.

"O Ú p°U +"LUL"+ d I'm t"pU)s1J


Try it here!

# Ruby, 51 bytes

One-indexed. Try it online

->n{['One more ']*n*?"+'LUL'+[" and I'm out"]*n*?"}


# PowerShell, 72 67 bytes

"$('"One more '*($c=1+"$args"))LUL$(' and I''m out"'*$c)".Trim('"')  Try it online! • "$('"One more '*($c=1+"$args"))LUL$(' and I''m out"'*$c)".Trim('"') shaved 5 by using a trim() instead of a join to skip the end "'s – colsw Jan 21 '17 at 18:16
• @ConnorLSW nice! good call, thank you – briantist Jan 21 '17 at 19:30

## Lua, 101 bytes

i,f,g='"One more ',' and I\'m out"',io.read()+1 print((i:rep(g).."LUL"..f:rep(g)):sub(2,g*24-(g-2)))


Obvious string attempt. Repeats "One more and and I'm out" exactly input + 1 times, with a LUL inbetween, then removes first and last quote.

Indexes from 1.

f 0="LUL";f n="One more \""++f(n-1)++"\" and I'm out"

• This seems to incorrectly print the LUL in quotes. – Zgarb Jan 19 '17 at 14:00
• Easy to make index from 0 using f -1="LUL", but I don't see how to remove extra quotes without a bunch of new symbols. – Wolfram Jan 19 '17 at 14:07

# Ruby, 70 bytes

def l x,t="LUL";x.times{t='"One more %s and I\'m out"'%t};t[1..~1];end


Simply loops for the amount it's given, surrounding the last string via a format string each time.

Index starts at one.

# Stacked, 54 bytes

('"One more ' ' and I''m out"')*'LUL'join'^.|.$'εrepl  Try it here! Example usage of "function": 1 ('"One more ' ' and I''m out"')*'LUL'join'^.|.$'εrepl
out


One for 56 bytes:

@n'One more LUL and I''m out':@o['LUL' '"'o'"'+ +repl]n*


# Python 3, 68 Bytes

def f(a):return('"One more '*a+'LUL'+(' and I%sm out"'%"'")*a)[1:-1]

• This gives incorrect output. Did you mean *a instead of *5? – mbomb007 Jan 19 '17 at 22:04
• Yes I did, thanks, I hadn't realised I'd put that – sonrad10 Jan 20 '17 at 7:45

# CJam, 51 49 bytes

" and I'm out\"""\"One more "li1+_@*"LUL"+1>@@*W<


Try it online

### Ungolfed:

" and I'm out\""   "\"One more " // Push two strings to the stack
_ @                         // Copy number and rise '"One more ' to the top
*                           // Multiply '"One more ' by a number
1>                          // Chop the first quote
@@                          // Push the result down
*                           // Multiply ' and I\'m out"' by a number
W<                          // Chop the last quote

• You can use W instead of -1 to save one byte – Business Cat Jan 19 '17 at 14:42
• Here are some other tricks to shorten this further: tio.run/nexus/cjam#@6/… ... I started by trying to avoid the \" by having a single string and adding the " to both ends with . Then I needed to split the string which I couldn't do with a length and /, because the first part is shorter. So I used a linefeed as a separator and did N/. Since we now have both parts in a list, we can easily repeat both of them at once with f*. And the LUL is inserted at the end with a simple join (*). – Martin Ender Jan 19 '17 at 14:50
• That's cool, but it looks more like completely different solution than shortening this further :) That's my first program on CJam, so I didn't know these tricks, thanks. Should I add this solution to the answer? – Wolfram Jan 19 '17 at 15:04
• @Wolfram It's up to you. I'm happy for you to use it (otherwise I wouldn't have commented ;)). – Martin Ender Jan 20 '17 at 12:14
• @Wolfram a nice first effort! You'll probably benefit a lot by going through Martin's answer – A Simmons Jan 20 '17 at 15:43

## Groovy, 54 bytes

{x->('"One more '*x+'LUL'+' and I\'m out\"'*x)[1..-2]}


Pretty straightforward, same as the python answer but 2 bytes shorter. It is also 1-indexed.

Try it Online!

## Mathematica, 65 63 Bytes

Nest["\"One more "<>#<>" and I'm out\""&,"LUL",#]~StringTrim~_&


Two bytes off by noticing the challenge allows 1-indexing.

# PHP

Hello, i found so far two ways for doing this.

The replacement way 1-indexed (121 bytes).

function f($x){$v='One more LUL and i\'m out';$t=$v;for($i=1;$i<=$x;$t=str_replace('LUL','"'.$t.'"',$v),$i++);return$t;}


The recursive way (86 bytes).

function r($n){$v=($n==0)?'LUL':'"'.r($n-1).'"';return'One more '.\$v.' and i\'m out';}

• In php, programs are almost always shorter than functions. – Titus Feb 16 '17 at 14:11

# C++, 80 + 16 = 96 bytes

std::string L(int c){return"One more "+(c?'"'+L(--c)+'"':"LUL")+" and I'm out";}


#include<string> - +16

Ungolfed:

std::string LUL(int count) {
return "One more " + (count? ('"' + LUL(--count) + '"') : "LUL") + " and I'm out";
}


Calls itself recursively and uses string addition. Pretty straight forward. I mean what else can I say? Even the ungolfed version is essentially a one liner.

Try it online!

# Cheddar, 71 bytes

i->('One more "'*i).slice(0,-1)+'LUL '+('and I\'m out" '*i).slice(0,-2)


Try it online!

• Maybe try recursion with _ f ->` syntax which may save some bytes – Downgoat Feb 14 '17 at 18:13
• Uhh, I'm not really familiar with how that syntax works, and I can't find it or any examples in the docs. – Pavel Feb 14 '17 at 18:19