StackMeterPlus
  • Member for 11 months
  • Last seen this week
Compose a song, line by line
7 votes

Python 3, 35 bytes print("We're no strangers to love") Try it online! Line for next day: You know the rules, and so do I. It begins.

View answer
Minimal distinct character quine
3 votes

Python 3, 11 distinct bytes p='p=%r;print(p%%p)';print(p%p) Try it online! Nice. Uses p and r as variables because print is necessary, so why not just use the characters from there? 31 bytes in ...

View answer
A problem of rarity
3 votes

Python, 266 63 bytes And we're down to less than half one-third one-quarter two-sevenths one-quarter of my original, so a lot less scuffed than anything I've put out, but it's a first answer: def a(b,...

View answer
Compose a song, line by line
2 votes

Day 16 Python 3, 786 bytes a, b, c, d, e, f, g, h, i, j = "side to side", "Oh-u-Oh-u-Oh ", "la ", " round and round", " yeah (yeah)", "catchy&...

View answer
CGCC sings a song together
2 votes

Line 14, " " Python 3, 0 bytes, score 26 [nothing here] Try it online! Gotta get Python in here somewhere.

View answer
Compose a song, line by line
2 votes

Day 14 Python 3, 725 bytes print("""side to side, side, side to side Oh-u-Oh-u-Oh Oh-u-Oh-u-Oh-u I'm falling Don we now our gay apparel, Fa la la la la la la la la The wheels on the ...

View answer
Time bomb (KoTH)
2 votes

Smart Random { name: "Smart Random", run(numbers) { var random_int = Math.floor(Math.random() * 3 * (numbers.length+1)/4); return random_int } } Returns a random integer ...

View answer
The Ackermann function
2 votes

Python 3, 58 49 bytes a=lambda m,n:m and a(m-1,n and a(m,n-1)or 1)or-~n Try it online! I didn't see a Python 3 answer (there was a Python 2), so I decided to fix that and put my own answer in here. (...

View answer
Output a Latin Square
2 votes

Python 3 - 127 118 bytes n=int(input()) m,o=[],[] for i in range(n): m.append(i) for i in range(n): o.append(m) m=m[-1:]+m[:-1] print(o) Try it online! Simple answer - takes a contiguous ...

View answer
Unscramble the Source Code
2 votes

Python - 37 mr79ltmo22mat51p*h(* .ian tpihgt)or() (NB: there are exactly two trailing spaces) This is both easy and hard at the same time. This program +Returns 1975 +Does not error or throw any ...

View answer
Implement hyperexponentiation/tetration without the use of '^'
2 votes

Python - 151 bytes Python 3.0: r=range def exp(a,b): if b=0: a=1 else: r1=a for i in r(1,b): s=s*a def tet(a,b): r1=0 if b=0: a=1 else: r1=a for i in range(1,b): r1=exp(a, result) ...

View answer
Follow a linked list
2 votes

Python, 84 61 bytes s=input() i=s.split(" ") n=0 o=[] while True: o.append(i[n]) n=i[n] Short, sweet, and simple: takes the input list, finds the index, adds the number to the list<s, ...

View answer
Can you give me half? (No digits)
1 votes

Python 3, 25 bytes print(len("l")/len("pr")) Try it online! Short, sweet, and with only 11 distinct bytes too.

View answer
Compose a song, line by line
Accepted answer
1 votes

Day 18 Python 3, 881 bytes print("""side to side, side, side to side Oh-u-Oh-u-Oh Oh-u-Oh-u-Oh-u I'm falling Don we now our gay apparel, Fa la la la la la la la la The wheels on the ...

View answer
Print this Multiplication Table
1 votes

Vyxal, 359 20 bytes, -j flag Try it online 9ƛɾMƛ\×j\=+nΠ+9↲7Ẏ;∑ Finally, I'm done, and to round up LoTM, more forward-slashes. (Edit 1: the \s are gone)

View answer
Drawing the Stack Overflow logo
1 votes

Vyxal, 246 103 bytes Try it online! »Ẋ℅Ḋ↑↵S₈q⁋τGB¡:₀Ẏæ⁽₈;↔≬(ɾ₆^¾∑₂ġL4Ẋ>X¯[¹„⁋∵⟨⌈IR₅⌐∑wġb√AøĊd□≠⟇⅛]ṫ¯GȮd↓a«Ǐḣ1…9₍D€Cv↔₀:y-»»ø¾q»` \\=\¯|_ `Ŀ Had to escape the dashes because otherwise string ...

View answer
Compose a song, line by line
1 votes

Day 12, Vyxal, 656 bytes Try it online! `side to side, side, side to side Oh-u-Oh-u-Oh Oh-u-Oh-u-Oh-u I'm falling Don we now our gay apparel, Fa la la la la la la la la The wheels on the bus go round ...

View answer
Compose a song, line by line
1 votes

Day 8 Python 3, 265 bytes print("""We're no strangers to love You know the rules and so do I A full commitment's what I'm thinking of You wouldn't get this from any other guy I just ...

View answer
Compose a song, line by line
1 votes

Day 5 (x2) Python 3, 190 bytes print("""We're no strangers to love You know the rules and so do I A full commitment's what I'm thinking of You wouldn't get this from any other guy I ...

View answer
Compose a song, line by line
1 votes

Day 3 Python 3, 111 bytes print("""We're no strangers to love You know the rules and so do I A full commitment's what I'm thinking of""") Try it online! Continued from ...

View answer
Rejecting invalid IPv4 addresses
1 votes

Python 3 - 307 bytes a=input() f=int b,c,d,e=a.split(".") b,c,d,e=f(b),f(c),f(d),f(e) print(not(not(b==0or b==10or (b==100and 63<c<128)or b==127or(b,c==169,254)or(b==172and 15<c<...

View answer
(Σ*)² ⟲ Σ* (aka Round-Trip a String Pair)
1 votes

Can't let @Mason have it for free (edit 1: also @Neil posted as I write this), so I'm dropping in with answer number 4 and 5 (edit 2: goddamn someone posted another answer): the python convertors. ...

View answer
Solve a Diagonal Burrows-Wheeler transform
1 votes

Python 3 - 34 + 176 167 + 11 16(math) = 221 217 Messy, but I coded it all by myself: import math as m def a(x): return x[::2] + x[1::2] def b(x): if len(x) % 2 == 0: x += " " c=&...

View answer
Implement a Truth-Machine
1 votes

Python - 40 bytes a=int(input()) while a: print(a) print(a) This is simple but effective. A fun thing about this is that while we could put a condition that a==1 in, this is more fun because it ...

View answer
What is the smallest positive base 10 integer that can be printed by a program shorter (in characters) than itself?
1 votes

Python - 52^7, 12 bytes print(52**7) Edit 1: (Rip 11-ception) After (embarrassingly) miscounting bytes, I'm back with the smaller version that turned out to be necessary. 52^7 is 1,028,071,702,528, ...

View answer
Create output twice the length of the code
1 votes

Python - (32 bytes - 25) = 7 k="1"*32 n=int(input()) print(k*n) So close :(. This code takes a string k (which is 32 chars long, same as this code), takes n as an input, and prints k ...

View answer
Collatz Conjecture (OEIS A006577)
1 votes

Python - 101 bytes n=int(input()) m=0 while n>1: if n%2==0: n=n/2 m+=1 else: n=3*n+1 m+=1 if n==1: print(m) This assumes n is inputted to STDIN as an integer. If it is not ...

View answer
Output the sign
1 votes

Python - 23 bytes print((n>0)*2+(n==0)-1) This checks if n is greater than 0 (in which case it outputs 2 for the next step), then if it is equal to 0 (in which case it outputs 1) and then ...

View answer
Print a 10 by 10 grid of asterisks
1 votes

Python - 40 20 23 bytes print(("*"*10+"\n")*10) # prints a row of 10 *s then a new line, 10 times This (freshly optimised) code prints an asterisk 10 times, then a newline (...

View answer
Minimal distinct character quine
0 votes

Perl 5, 18 distinct bytes $_=q(print"\$_=q($_);eval;");eval; Try it online! This is a classic Perl quine. I have no idea how Perl works, but this is tested on TIO. Feel free to tell me how ...

View answer