MercyBeaucou
  • Member for 5 years, 2 months
  • Last seen more than a month ago
  • Seattle, WA, United States
Volumes of ASCII boxes
2 votes

Befunge 93, 56 bytes ~2%#^_1+ @.*+< `"z"~<|:`~0+ 5*\`#^_\1>*\~7 %2~\<\+1_^# Try it Online! Explanation: The volume of the box can be calculated by multiplying the number of .s ...

View answer
Display a chain of little mountains with an odd number on the top of it!
2 votes

Befunge 93, 64 bytes Try it Online! &61p1 v+2,,,"/ \" _v#!`" ":<+2.," ": <^p00p10"|<" @ >91+,$1v

View answer
Factorial digit sum
2 votes

Befunge 93, 56 54 bytes Saved 2 bytes do to using get instead of quotes. This let me shift the top 2 lines over 1, reducing unnecessary white space. Try it online! &#:<_v#:-1 : \*$<:_^# g:...

View answer
Merge two values
1 votes

Befunge-93, 20 bytes &::&*#v_&+.@ @.*!-&< Try it online! Explanation this boils down to: if(A * B = 0) { output (A + B) end } else { output A * (A = B) end }

View answer
Prime or highest factor
1 votes

Befunge-98 (FBBI), 39 bytes j&:!+f0p1-1:::' -:!j;3k$.nbj;-\%!!j:1+a Try it online! Ends with the & when there are no more numbers. This causes the program to stall for 60 seconds until TIO ...

View answer
Make an Emergency Corridor
1 votes

Befunge-98 (FBBI), 14 bytes Uses 0 for cars, and 1 for the empty lane. 12&:b0p`j\' k. Try it online! This uses a & to end the program, stalling it until TIO shuts it off, instead of ending ...

View answer
The Non-Zero Digital Product Challenge
1 votes

Befunge-98 (PyFunge), 14 bytes 1<*+!:-0'~.j@# Try it online!

View answer
What is the missing number (divisibility by 9)
1 votes

Befunge-98 (PyFunge), 15 13 bytes I realized that I don't need to use ? to represent the absent digit, so I used one that is a multiple of 9 after subtracting 48: x This let me golf off the 3+. #v~'...

View answer
What is the missing number (divisibility by 9)
1 votes

Befunge-93 (PyFunge), 22 21 bytes I realized that I don't need to use ? to represent the absent digit, so I used one that is a multiple of 9 after subtracting 48: x This let me golf off the 3+, but ...

View answer
Snakes all around
1 votes

Befunge-98 (FBBI), 22 18 bytes Saved 4 bytes by putting the "-):(" at the beginning. This let me get rid of the separate printing of the head, and also the ' for pushing the =. "-):(=&...

View answer
Mathematics is fact. Programming is not
1 votes

Befunge-98 (PyFunge), 22 20 bytes Golfed off 2 bytes because I realized that if I used k instead of j to do the logical notting to account for a 0 without a factorial, I didn't have to mod the ASCII ...

View answer
From Programming Puzzles to Code Golf
1 votes

Befunge-98, 51 bytes ]@,k9"Code"*84"Golf"; ["selzzuP gnimmargorP">:#,_@; Try it online! The main idea here is to use the "turn right" operator (]) to check if there is a line below the first one....

View answer
Add two numbers
1 votes

Wise, 9 bytes [?~-!-~]| Try it Online! Takes 2 numbers in, A, and B. Implicit input [ .... ] While the top (B) != 0, repeat: ? Move B to the bottom ~- Add 1 to ...

View answer
Is this even or odd?
1 votes

Befunge 93, 5 bytes &2%.@ Try it Online! & Take input 2% Mod 2 .@ Print and exit This answer is very similar to Befunge 98, but it needs the @ to end because & pushes ...

View answer
Is this even or odd?
1 votes

Befunge 98, 4 bytes &2%. Try it Online! (It may take a while because of how it ends) & Take input 2% Mod 2 . Print & The IP wraps around and hits the "take ...

View answer
Simple cat program
1 votes

Del|m|t, 14 bytes (non-competing) Try it Online! 7 / 1 3 > ? 9 No command line argument, because is the default Explanation: (7) 23 Gets the next char from input (-1 if its EOF) (/) 15 ...

View answer
Test a number for narcissism
1 votes

Befunge 98, 58 bytes 1-00p&:a\v 00g1+00p>:a%\a/:!kv \:9`kv00gk:00gk*+> @.!-$< Try it Online! I'm sure this can be golfed further. I will take another look at it and add an ...

View answer
Snakes all around
1 votes

Befunge 93, 25 bytes Try it Online! 1+:&`#v_"=", "(:)-"<@,,,, Not compatible with '98, because the & character acts like r when there is no input, instead of repeating ...

View answer
Check if number is a sum of consecutive numbers or not
1 votes

Befunge-93, 28 bytes Try it Online! &v@.1<@.0< :</2_^#!_^#-1\%2: Instead of checking if the given integer is an element in this sequence, it's much easier to check if it isn't in the ...

View answer
Collatz Conjecture (OEIS A006577)
1 votes

Befunge 93, 37 bytes Try it Online! &>:1-| \@#-1<+2_.# v#%2:<+1*3:_ <v/2: Explanation: & Take integer input >:1-| If the top of the stack is 1, go to the 2nd ...

View answer
Build an Alphabet Pyramid
1 votes

Befunge 93, 175 bytes Try it online! Probably not very well golfed. Oh well. This was hard enough with befunge: &:00p"B"\- :13v v,: _v#`"@"<p5< v," "<v`+*9< >" ",: 35g7^ v47"v"_&...

View answer
Print invisible text
0 votes

Befunge-98 (PyFunge), 5 bytes #@~a, Try it online! For every character in the input (#@~), this prints a new line (a,).

View answer
Script that outputs a script that prints a given input
0 votes

Befunge-98 (PyFunge), 30 bytes '":v ~\#[ <v">:#,_""# <>4k,'@, Try it online! This prints a program in the form "...ihgfedcba">:#,_@, which prints ...

View answer
Print numbers from 1 to 10
0 votes

><>, 10 bytes llnao:9=?; Try it online! Explanation: This program pushes the length of the stack instead of trying to increment the top of the stack, because l is shorter than 1+, and you ...

View answer
Swap the parity
0 votes

Befunge-93, 11 bytes &:2%2*1-+.@ [Try it online!] Explanation: Stack representation: bottom [A, B, C top &: Pushes 2 copies of the input, N: [N, N 2% ...

View answer
Stay away from zero
0 votes

Befunge-98, 5 bytes &:!+. Try it Online! (Warning - will take 60 seconds per test because of how TIO treats &) Explanation &: Push 2 copies of the input ! Logical not the ...

View answer
Two roads diverged in a yellow wood (part 1)
0 votes

Befunge 98, 11 bytes -!jv~' @.~< Try it Online! Prints 32 for left, and 35 for right, both with a single trailing space. Explanation -!jv This is a no-op the first time through, but used ...

View answer
Oddly Even, Positively Negative
0 votes

Wise, 19 bytes ::>!:><^^~![!-!-~]| Try it Online! This is just a port of @Dennis' Jelly answer to Wise.

View answer
Oddly Even, Positively Negative
0 votes

Befunge 93, 25 bytes Zero-indexed &4/2*1+&4%3%!!+&2%2*1-*.@ Try it Online! The number is given by ((2(n / 4) + 1) + !!((n % 4) % 3)) * (2(n % 2) - 1)

View answer
Largest number in ten bytes of code
0 votes

Befunge-93, ~2.49e+40 "**:*:*:*. This works by pushing the ASCII values of the program onto the stack and doing a bunch of multiplication. Unfortunately, this doesn't work in TIO, but it does in ...

View answer