text:
Let's draw the Triforce
The Triforce is a fictional artifact in The Legend of Zelda, made of three identical-looking equilateral triangles representing power, wisdom and courage. Several games in the saga include an animation when the three parts finally join together.
The purpose of this challenge is to draw a single 2D frame of such a simplified animation, with a given width for the triangles and a given spacing between the parts.
Input
The input consists of two integers: a width \$w\ge1\$ and a spacing value \$s\ge0\$.
Output
The frame has to be drawn according to the following specifications:
         /\
        /  \____________ this part is horizontally centered
       /    \
      /______\
                    \___ s empty lines
                    /
   /\          /\
  /  \        /  \______ w+1 backslashes
 /    \      /    \
/______\    /______\
                \_______ 2w underscores
        |__|
          \_____________ 2s spaces

In the above example, we have \$w=3\$ and \$s=2\$.
More examples
\$w=1\$, \$s=0\$:
   /\
  /__\
 /\  /\
/__\/__\

\$w=2\$, \$s=0\$:
     /\
    /  \
   /____\
  /\    /\
 /  \  /  \
/____\/____\

\$w=3\$, \$s=3\$:
          /\
         /  \
        /    \
       /______\

   /\            /\
  /  \          /  \
 /    \        /    \
/______\      /______\

\$w=4\$, \$s=1\$:
          /\
         /  \
        /    \
       /      \
      /________\

    /\          /\
   /  \        /  \
  /    \      /    \
 /      \    /      \
/________\  /________\

Rules

Trailing spaces on each line are optional.
Extra leading spaces on each line are not allowed.
You may output a single extra leading newline and/or a single extra trailing newline.
This is code-golf.

Python 2, 197 194 169 167 155 144 bytes
w,s=input()
l=['']*(2*-~w+s)
for i in range(-~w):W=w-i;b='/'+'_ '[i<w]*2*i+'\\';l[i::w-~s]=' '*(w+s-~W)+b,' '*W+b+'  '*(W+s)+b
print'\n'.join(l)

Try it online!

Saved:

-3 bytes, thanks to Mr. Xcoder

Charcoal, 25 bytes
←×_Ｎ↗⊕θ‖Ｍ≔⁺⊕θＮηＣη±η‖ＢＯ⊗⊕θ

Try it online! Link is to verbose version of code. Explanation:
←×_Ｎ

Input w and draw w _s.
↗⊕θ

Draw w+1 /s.
‖Ｍ

Reflect to complete the first triangle.
≔⁺⊕θＮη

Input s and calculate the offset between the left and middle triangles.
Ｃη±η

Copy the left triangle to the middle.
‖ＢＯ⊗⊕θ

Reflect around the middle triangle to complete the triforce.

Uh, check your math on this. This may be 25 characters, but it's 50 to 65 bytes (depending on whether you use UTF-16 or UTF-8 representation, respectively).

My bad; apparently, Charcoal and Canvas have their own character mappings, which seems a touch silly to me (if you're going to use arbitrary symbols, why not use an existing selection), but whatever.

@StuartP.Bentley The point of this site is to golf program size. Many languages (there are many, many more than just Canvas & Charcoal) opted for utilizing all 8 bits per byte, since that's a very good way to reach closer to maximum golfiness. The pretty unicode is just for making code easier to read and write (you try programming in C by writing bytecode; we are humans too)

Python 2, 127 124 bytes
w,s=input()
n=2*-~w+s
while n:n-=1;I=w-n+(n>w)*(w-~s);print' '*n+('  '*(n+s)).join(['/'+I*2*' _'[I>=w]+'\\'][I>w:]*-~(n<=w))

Try it online!

Canvas, 20 19 16 bytes
＋├：⁸╵＼Ｌ_×；∔║ω╋║↕

Try it here!
Explanation:
+├                s + w + 2
  :               duplicated (for both X & Y)
   ⁸╵\            w+1 sized diagonal
      L_×         "_"*width of the diagonal
         ;∔       prepended before the diagonal
           ║      palindromize that
            ω     and push the argument of ║ (aka the unpalindromized version)
             ╋    overlap the upside down half-triangle over the upside down triangle at (s+w+2; s+w+2)
              ║   and palindromize the whole thing
               ↕  reverse everything vertically

note: in the making of this I fixed a mistake in the code, Without that fix, this would be 18 bytes.

Like Neil's answer, this may be 16 characters, but in Unicode terms, it's either 32 or 44 bytes, depending on which UTF you use. (I considered that it might be representable in a legacy single-byte character set like code page 437, but there's no ω or ⁸ available there, so it seems to me you'd have to go with a Unicode transformation format.)

@StuartP.Bentley Canvas uses a custom codepage, as linked in the title of my post. The github wiki for Charcoal contains its codepage too. It's agreed upon on PPCG that it's okay to answer with unicode formatted answers if there's a codepage/converter backing it up.

Tcsh, okay (though at the point that you're using arbitrary converters, it seems to me that you might as well be writing in a language with full names and measuring a compiled VM bytecode instruction length).

@StuartP.Bentley Check the Charcoal answers link - it contains human readable code! (so yes, 2 transpilations :p) People here do answer in assembly scoring as machine code, so there's no reason to answer in VMs too

R, 225, 224, 214, 211, 208 bytes
function(w,s){M=matrix
C=cbind
h=w+1
k=C(apply(m<-diag(h)*60,1,rev)/4,m)
k[row(k)==h&!k]=63
z=rbind(C(a<-M(0,h,h+s),k,a),M(0,s,h*4+2*s),C(k,M(0,h,2*s),k))
z[]=intToUtf8(z+32,T)
apply(z,1,cat,sep='','
')
rm()}

Try it online!

-1 byte thanks to Giuseppe
-10 bytes after change of approach
-3 bytes exploting ASCII code
-3 bytes thanks to JayCe

Since I couldn't find anything to add to this... I just renamed variables and also I am suggesting another avenue to return silently... which I am not completely satisfied with TBH. Will keep searching! TIO

oh wait ... if(F)0 is acceptable for sure and saves one byte. Or even better rm() for 3 bytes.

My suggestion to use q() in my first comment is invalid as per this meta

@JayCe: great trick using rm() !

Python 2, 256 248 240 228 199 195  bytes
A longer program, but slightly different approach:
f,b,o='/\ '
O=o*2
w,s=input()
l=f+'__'*w+b
a=l+O*s+l
m=n=[]
p=lambda g:(len(a)-len(g))/2*o+g
for i in range(w):m=m+[p(f+O*i+b)];t=f+O*i+b;n+=p(t+O*(w-i+s)+t),
print'\n'.join(m+[p(l)]+[o]*s+n+[a])

Try it online!

saved a lot of bytes thanks to ignoring the trailing whitespace, and incorporating some tricks from @ovs
saved even more by defining a variable earlier

I shall have to fix this tomorrow (it works, but I can do better)

218 bytes.

216 bytes

fixed byte count.

that was a byproduct from when there was two

go ahead and edit, on mobile right now

that would be nice

Pascal (FPC), 296 264 bytes
const A='/';B='\';var w,s,i:word;u:string;begin read(w,s);u:=StringOfChar('_',2*w);for i:=1to w do writeln(A:w+3+s+w-i,B:i*2-1);writeln(A:w+2+s,u,B);for i:=1to s do writeln;for i:=1to w do writeln(A:w+2-i,B:i*2-1,A:2*(s+w-i)+3,B:i*2-1);write(A,u,B,A:2*s+1,u,B)end.

Try it online!

Ruby, 126 bytes
->w,s{(-v=w+1).upto(v){|i|j= ~-i%-~v;$><<[$/*s,$/+' '*(v+s)+t="/#{(j<w ?' ':?_)*j*2}\\".center(w*2+2)+' '*s*2,$/+t*2][0<=>i]}}

Try it online!

Retina 0.8.2, 141 bytes
\d+
$*
(?=( *),( *))
¶$1/$`$`\$1$2$2$1/$`$`\
T` `\_`/ *\\(?=.*,)
s`¶(.*),( *)
$1¶$.2$*¶$1
\G(( *)/(  |__)*\\)\2(  )*\1 *¶
$2 $#3$* $#4$* $1¶

Try it online! Note: Some trailing whitespace in output. Explanation:
\d+
$*

Convert the inputs into spaces. (The second line ends with a space.)
(?=( *),( *))
¶$1/$`$`\$1$2$2$1/$`$`\

Create the sides of the bottom two triangles with the appropriate spacing.
T` `\_`/ *\\(?=.*,)

Fill in the base of the triangles.
s`¶(.*),( *)
$1¶$.2$*¶$1

Duplicate the triangles with the appropriate vertical spacing.
\G(( *)/(  |__)*\\)\2(  )*\1 *¶
$2 $#3$* $#4$* $1¶

Convert the upper triangles into a single centred triangle.

C (gcc), 404 389 bytes
#define p(x)putchar(x);
#define F for
W;S;i;a=32;b=47;c=92;f(w,s){W=w,S=s;F(;w;--w){F(i=W+w+s+1;i--;)p(a)p(b)F(i=w*2;i++-2*W;)p(a)p(c)p(10)}F(i=W+s+1;i--;)p(a)p(b)F(i=0;i++-2*W;)p(95)p(c)F(;s--+1;)p(10)F(w=W;w;--w){F(i=w;i--;)p(a)p(b)F(i=w*2;i++-2*W;)p(a)p(c)F(i=w*2+S*2;i--;)p(a)p(b)F(i=w*2;i++-2*W;)p(a)p(c)p(10)}p(b)F(i=0;i++-2*W;)p(95)p(c)F(i=S*2;i--;)p(a)p(b)F(i=0;i++-2*W;)p(95)p(c)}
Try it online!
-14 bytes from Rodolvertice
-1 byte by fixing a loop variable decrementation
crossed out 404 is almost still 404
Ungolfed:
#define p(x)putchar(x); // save 7 bytes per putchar call (+24, -182)
#define F for // save 2 bytes per for loop (+14, -28)
int W, S, i; // W is w backup, S is s backup, i is an counter variable;
int a = ' '; // save 1 byte per space printed (+5, -8) (use a instead of 32)
int b = '/'; // save 1 byte per slash printed (+5, -6) (use b instead of 47)
int c = '\\'; // save 1 byte per backslash printed (+5, -6) (use c instead of 92)
// This isn't worth it for '\n' (-5, +3) (10), or '_' (-5, +3) (95)
int f(int w, int s) {
    W = w; // Backup w and s, as we will modify them later,
    S = s; // but will need their original values
    for(; w != 0; --w) { // Top triangle (not the bottom line)
        for(i = W+w+s+1; i != 0; --i) // leading spaces
            putchar(' ');
        putchar('/'); // left side of triangle
        for(i = 2*w; i != 2*W; ++i) // inner spaces
            putchar(' ');
        putchar('\\'); // right side of triangle
        putchar('\n'); // newline
    }
    for(i = W+s+1; i != 0; --i)
        putchar(' '); // leading spaces for the bottom line
    putchar('/'); // left side
    for(i = 0; i != 2*W; ++i)
        putchar('_'); // the bottom line
    putchar('\\'); // right side
    for(; s-- + 1 != 0;)
        putchar('\n'); // newline after the bottom line and S empty lines
    for(w = W; w != 0; --w) { // Bottom triangles
        for(i = w; i != 0; --i)
            putchar(' '); // leading spaces
        putchar('/'); // left of left triangle
        for(i = w*2; i != 2*W; ++i)
            putchar(' '); // inside of left triangle
        putchar('\\'); // right of left triangle
        for(i = w*2+S*2; i != 0; --i)
            putchar(' '); // spaces between left and right triangles
        putchar('/');
        for(i = w*2; i != 2*W; ++i)
            putchar(' '); // inside of right triangle
        putchar('\\'); // right of right triangle
        putchar('\n'); // newline
    }
    putchar('//'); // left of left
    for(i = 0; i != 2*W; ++i)
        putchar('_'); // bottom of left triangle
    putchar('\\'); // right of left
    for(i = S*2; i != 0; --i)
        putchar(' '); // space between triangles
    putchar('/'); // left of right
    for(i = 0; i != 2*W; ++i)
        putchar('_'); // bottom of left triangle
    putchar('\\'); // right of right
}

#define f for   saves a few bytes

Can you not do #define p putchar?

@RK. If I did, then I would have to use p(x); instead of p(x), for (+26, -6) = +20 bytes. The semicolon is included when the macro is expanded.

284 bytes

Jelly, 51 bytes
+‘⁶ẋ;Ɱ®Y
‘⁼þ`a”/o"”_o⁶Ṛ;ṚØ^yƊ$€©ż`j€Ḥ⁶ẋƊ}Y,@çj‘⁷ẋƊ}

Try it online!


text:
Get me out of here
Challenge
Given a grid size, obstacles' positions, player position and target position your task is to find a path for the player to get to the target and avoid the obstacles at the same time (if necessary).

Input

N: Grid size N x N
P: Player's position [playerposx, playerposy]
T: Target's position [targetposx, targetposy]
O: Obstacles' positions [[x1, y1], [x2, y2],...,[xn, yn]]

Output
Path: A path player can use to reach target [[x1, y1], [x2, y2],...,[xn, yn]]

Rules

The point [0,0] is on the top-left corner of the grid.
Player's position will always be on the left side of the grid.
Target's position will always be on the right side of the grid.
The grid will always have at least one obstacle.
You can assume that no obstacle overlaps player or target position.
You don't necessarily need to find the min path.
The player can only move left, right, top and bottom not diagonally.
You can take the input in any convenient way.
You can assume that a path for the player to get to target will always exist.
Obviously, for each input multiple valid paths exist, choose one.
Assume N > 2 so the grid will be at least 3 x 3.

Examples
Input: 9, [6, 0], [3, 8], [[0, 5], [2, 2], [6, 4], [8, 2], [8, 7]]
Possible Output: [[6, 0], [6, 1], [6, 2], [6, 3], [5, 3], [5, 4], [5, 5], [5, 6], [5, 7], [5, 8], [4, 8], [3, 8]]
Input: 6, [1, 0], [3, 5], [[1, 2], [2, 5], [5, 1]]
Possible Output: [[1, 0], [1, 1], [2, 1], [2, 2], [2, 3], [2, 4], [3, 4], [3, 5]]

Note
Notice that X is for rows and Y for cols. Don't confuse them with the coordinates in an image.
Edit
As @digEmAll pointed out, due to rules #2 and #3, playerY = 0 and targetY = N-1. So, if you want you can take as input only playerX and and targetX (if that makes your code shorter).

"Player position will always be on left side and target on right side" : does this mean that player-y = 0 and target-y = N-1 ? If so, can we just accept the x-coordinate (one number) for player and target ?

@digEmAll Good point. Honestly, I didn't think of this and yes you can I will edit this.

Related but easier. Related but harder.

Does the path have to be from start to finish, or can it be in reverse order?

@kamoroso94 Yes, start to target (finish) :)

JavaScript (ES6), 135 bytes
Takes input as (width, [target_x, target_y], obstacles)(source_x, source_y), where obstacles is an array of strings in "X,Y" format.
Returns an array of strings in "X,Y" format.
(n,t,o)=>g=(x,y,p=[],P=[...p,v=x+','+y])=>v==t?P:~x&~y&&x<n&y<n&[...o,...p].indexOf(v)<0&&[0,-1,0,1].some((d,i)=>r=g(x+d,y-~-i%2,P))&&r

Try it online!
Commented
(n, t, o) =>              // n = width of maze, t[] = target coordinates, o[] = obstacles
  g = (                   // g() = recursive search function taking:
    x, y,                 //   (x, y) = current coordinates of the player
    p = [],               //   p[] = path (a list of visited coordinates, initially empty)
    P = [                 //   P[] = new path made of:
      ...p,               //     all previous entries in p
      v = x + ',' + y     //     the current coordinates coerced to a string v = "x,y"
    ]                     //
  ) =>                    //
    v == t ?              // if v is equal to the target coordinates:
      P                   //   stop recursion and return P
    :                     // else:
      ~x & ~y             //   if neither x nor y is equal to -1
      && x < n & y < n    //   and both x and y are less than n
      & [...o, ...p]      //   and neither the list of obstacles nor the path
        .indexOf(v) < 0   //   contains a position equal to the current one:
      && [0, -1, 0, 1]    //     iterate on all 4 possible directions
        .some((d, i) =>   //     for each of them:
          r = g(          //       do a recursive call with:
            x + d,        //         the updated x
            y - ~-i % 2,  //         the updated y
            P             //         the new path
          )               //       end of recursive call
        ) && r            //     if a solution was found, return it

R, 227 bytes
function(N,P,G,O){M=diag(N+2)*0
M[O+2]=1
b=c(1,N+2)
M[row(M)%in%b|col(M)%in%b]=1
H=function(V,L){if(all(V==G+2))stop(cat(L))
M[t(V)]=2
M<<-M
for(i in 0:3){C=V+(-1)^(i%/%2)*(0:1+i)%%2
if(!M[t(C)])H(C,c(L,C-2))}}
try(H(P+2,P),T)}

Try it online!
Not really short, and definitely not giving the shortest path (e.g. check the first example).
It basically performs a recursive depth-first search and stops as soon as the target has been reached, printing the path.
Thanks to JayCe for the improvement in output formatting

+1 I like the way you print the output (not the typical boring list of lists) :)

@DimChtz: well thanks but... that's the helper function, the code-golf function just prints a list of coordinates x1 y1 x2 y2 ... xn yn :D

Yes, I know :P but still nice.

agree with @DimChtz... and I think it looks even better if you write(t(mx),1,N) instead of printing :)

@JayCe: good idea, changed !

Python 2, 151 149 bytes
N,s,e,o=input()
P=[[s]]
for p in P:x,y=k=p[-1];k==e>exit(p);P+=[p+[[x+a,y+b]]for a,b in((0,1),(0,-1),(1,0),(-1,0))if([x+a,y+b]in o)==0<=x+a<N>y+b>-1]

Try it online!

Haskell, 133 131 130 bytes

-1 byte thanks to BWO

(n!p)o=head.(>>=filter(elem p)).iterate(\q->[u:v|v@([x,y]:_)<-q,u<-[id,map(+1)]<*>[[x-1,y],[x,y-1]],all(/=u)o,x`div`n+y`div`n==0])

Try it online! (with a few testcases)
A function ! taking as input

n :: Int size of the grid
p :: [Int] player's position as a list [xp, yp]
o :: [[Int]] obstacles position as a list [[x1, y1], [x2, y2], ...]
t :: [[[Int]]] (implicit) target's position as a list [[[xt, yt]]] (triple list just for convenience)

and returning a valid path as a list [[xp, yp], [x1, y1], ..., [xt, yt]].
As a bonus, it finds (one of) the shortest path(s) and it works for any player's and target's position. On the other hand, it's very inefficient (but the examples provided run in a reasonable amount of time).
Explanation
(n ! p) o =                                                         -- function !, taking n, p, o and t (implicit by point-free style) as input
    head .                                                          -- take the first element of
    (>>= filter (elem p)) .                                         -- for each list, take only paths containing p and concatenate the results
    iterate (                                                       -- iterate the following function (on t) and collect the results in a list
        \q ->                                                       -- the function that takes a list of paths q...
            [u : v |                                                -- ... and returns the list of paths (u : v) such that:
                v@([x, y] : _) <- q,                                -- * v is an element of q (i.e. a path); also let [x, y] be the first cell of v
                u <- [id, map (+ 1)] <*> [[x - 1,y], [x, y - 1]],   -- * u is one of the neighbouring cells of [x, y]
                all (/= u) o,                                       -- * u is not an obstacle
                x `div` n + y `div` n == 0                          -- * [x, y] is inside the grid
            ]
    )

This function performs a recursive BFS via iterate, starting from the target and reaching the player's starting position. Paths of length \$k\$ are obtained by prepending appropriate cells to valid paths of length \$k-1\$, starting with the only valid path of length 1, that is the path [[xt, yt]].
The apparently obscure expression [id, map (+ 1)] <*> [[x - 1,y], [x, y - 1]] is just a "golfy" (-1 byte) version of [[x + 1, y], [x, y + 1], [x - 1, y], [x, y - 1]].

Welcome to PPCG! Nice first answer!

@Arnauld Thanks! I actually spent several hours trying to squeeze a few bytes out of my solution just to beat your 135 ^^

Nice golf! You can save one byte by using an operator instead of a function: Try it online!

@BWO Thanks for the tip. I'm new here, so there are many tricks I've never heard of

Btw. there is a section with tips for Haskell in particular where you can find this and many more tricks. Oh and there's always chat too: Of Monads and Men

APL (Dyalog Unicode), 79 75 bytes
{⍺←0j¯1⋄n p t o←⍵⋄p=t:p⋄p,(-∘p∇⊣@1∘⍵)⊃s/⍨{~∨/¯1n∊9 11○⍵}¨s←o~⍨p+⍺×0j1*3⌽⍳4}

Try it online!
-4 bytes by refactoring c thanks to @Adám.

APL (Dyalog Unicode), 79 bytes
{⍺←0j¯1⋄n p t o←⍵⋄p=t:p⋄c←⊃s/⍨{~∨/¯1 n∊9 11○⍵}¨s←o~⍨p+⍺×0j1*3⌽⍳4⋄p,(c-p)∇c@1⊢⍵}

Try it online!
Takes a 4-element array N P T O as input, where N is an integer and the coordinates are represented as complex numbers.
Interprets a complex number x + yi (XjY in APL's notation) as the position (x, y), where (0, 0) is at the bottom left of the board and x and y directions are right and upwards respectively. Uses the right-hand-touching algorithm in this view, which works because both the start and the target are adjacent to the outer wall (and the minimal path is not required). The path may have multiple copies of the same coordinates when it encounters a dead end. To ensure that the player is touching the right-hand wall at start, the direction is initialized to the downwards direction -i.
Ungolfed with comments
f←{
  ⍺←0j¯1
  d←⍺                ⍝ direction, default down
  n p t o←⍵          ⍝ decompose the inputs
  p=t:p              ⍝ player = target: reached the goal
  turn←0j1*¯1 0 1 2  ⍝ turns to try out, right turn first
  steps←o~⍨p+d×turn  ⍝ possible steps from current position
  chosen←⊃steps/⍨{~∨/¯1 n∊9 11○⍵}¨steps  ⍝ the free spot with highest precedence
  d2←chosen-p        ⍝ keep track of the previous step
  p,d2∇n chosen t o  ⍝ move one step and recurse
}

75: {⍺←0j¯1⋄n p t o←⍵⋄p=t:p⋄p,(-∘p∇⊣@1∘⍵)⊃s/⍨{~∨/¯1n∊9 11○⍵}¨s←o~⍨p+⍺×0j1*3⌽⍳4}

Retina 0.8.2, 229 bytes
.
$&$&
@@
s@
##
.#
{`(\w.)\.
$1l
\.(.\w)
r$1
(?<=(.)*)\.(?=.*¶(?<-1>.)*(?(1)$)\w)
d
}`\.(?=(.)*)(?<=\w(?(1)$)(?<-1>.)*¶.*)
u
+T`.`#`.(?=(.)*)(?<=d#(?(1)$)(?<-1>.)*¶.*)|(?<=(.)*.).(?=.*¶(?<-2>.)*(?(2)$)u#)|(?<=#r).|.(?=l#)
.(.)
$1

Try it online! Not sure whether the I/O format qualifies. Explanation:
.
$&$&

Duplicate each cell. The left copy is used as a temporary working area.
@@
s@

Mark the start of the maze as visited.
##
.#

Mark the end of the maze as being empty.
{`(\w.)\.
$1l
\.(.\w)
r$1
(?<=(.)*)\.(?=.*¶(?<-1>.)*(?(1)$)\w)
d
}`\.(?=(.)*)(?<=\w(?(1)$)(?<-1>.)*¶.*)
u

While available working cells exist, point them to adjacent previously visited cells.
+T`.`#`.(?=(.)*)(?<=d#(?(1)$)(?<-1>.)*¶.*)|(?<=(.)*.).(?=.*¶(?<-2>.)*(?(2)$)u#)|(?<=#r).|.(?=l#)

Trace the path from the exit to the start using the working cells as a guide.
.(.)
$1

Delete the working cells.

JavaScript, 450 bytes
Takes input as (n, {playerx, playery}, {targetx, targety}, [{obstaclex, obstacley}]).
Returns an array of {hopx, hopy}.
j=o=>JSON.stringify(o);l=a=>a.length;c=(a,o)=>{let i=l(a);while(i>0){i--;if(j(a[i])==j(o)){return 1;}}return 0;}h=(p,t,o)=>{if(p.y<t.y&&!c(o,{x:p.x,y:p.y+1})){return{x:p.x,y:p.y+1};}if(p.y>t.y&&!c(o,{x:p.x,y:p.y-1})){return{x:p.x,y:p.y-1};}if(p.x<t.x&&!c(o,{x:p.x+1,y:p.y})){return{x:p.x+1,y:p.y};}if(p.x>t.x&&!c(o,{x:p.x-1,y:p.y})){return{x:p.x-1,y:p.y};}return t;}w=(n,p,t,o)=>{let r=[];r.push(p);while(j(p)!==j(t)){p=h(p,t,o);r.push(p);}return r;}

Here is an unobfuscated version on my mess:
// defining some Array's function for proper comparaisons
json = (object) => { return JSON.stringify(object) };
length = (array) => { return array.length; }
contains = (array, object) => {
    let i = length(array);
    while (i > 0) {
    i--;
        if (json(array[i]) == json(object)) { return true; }
    }
    return false;
}
//return next found hop
getNextHop = (player, target, obstacles) => {
    //uggly serie of conditions
    //check where do we have to go and if there is an obstacle there
    if(player.y<target.y && !contains(obstacles, [x:player.x, y:player.y+1])) { return [x:player.x, y:player.y+1]; }
    if(player.y>target.y && !contains(obstacles, [x:player.x, y:player.y-1])) { return [x:player.x, y:player.y-1]; }
    if(player.x<target.x && !contains(obstacles, [x:player.x+1, y:player.y])) { return [x:player.x+1, y:player.y]; }
    if(player.x>target.x && !contains(obstacles, [x:player.x-1, y:player.y])) { return [x:player.x-1, y:player.y]; }
    return target;
}
//return found path
getPath = (gridsize, player, target, obstacles) => {
    let path = [];
    path.push(player);
    //while player is not on target
    while(json(player)!=json(target)) {
        player = getNextHop(player, target, obstacles); //gridsize is never used as player and target are in the grid boundaries
        path.push(player);
    }
    return path;
}

source: Stack Exchange

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

sort: votes


text:
Extract and Divide
Challenge
For a given positive integer \$n\$:

Repeat the following until \$n < 10\$ (until \$n\$ contains one digit).
Extract the last digit.
If the extracted digit is even (including 0) multiply the rest of the integer by \$2\$ and add \$1\$ ( \$2n+1\$ ). Then go back to step 1 else move to step 4.
Divide the rest of the integer with the extracted digit (integer / digit) and add the remainder (integer % digit), that is your new \$n\$.

Note: In case n < 10 at the very beginning obviously you don't move to step 2. Skip everything and print \$[n, 0]\$.

Input
n: Positive integer.

Output
[o, r]: o: the last n, r: number of repeats.

Step-by-step example
For input n = 61407:
Repeat 1: 6140_7 -> 6140 / 7 = 877, 6140 % 7 = 1 => 877  + 1 = 878
Repeat 2: 87_8   -> 2 * 87 + 1 = 175 (even digit)
Repeat 3: 17_5   -> 17   / 5 = 3,   17   % 5 = 2 => 3    + 2 = 5 ( < 10, we are done )

The output is [5, 3] (last n is 5 and 3 steps repeats).

Rules
There are really no rules or restrictions just assume n > 0. You can either print or return the output.

I'm pretty sure that most answers from here can be trivially modified to answer this question.

@Arnauld No, the output needs to be two numbers (returned or printed). I guess you could convert the decimal number to string, replace . with whitespace and print it.

Do we enter step 2 if n<10?

@Arnauld That is not the same for n=2 and n=4.

@Arnauld Let me know if it's any better :)

Yes. It's much clearer now. :)

R, 93 bytes
function(n,r=0,e=n%%10,d=(n-e)/10)"if"(n<10,c(n,r),"if"(e%%2,f(d%/%e+d%%e,r+1),f(d*2+1,r+1)))

Try it online!

Save some bytes by getting rid of second "if", reversing n<10 condition and using %/% in d definition : TIO

agree with @KirillL.  . Also unfortunately f= needs to be included in the bytecount since the function is called recursively.

Python 2, 78 77 76 73 bytes
Recursive version. Saved 3 bytes thanks to Jonathan Frech.
f=lambda n,r=0:n>9and f(n%2*sum(divmod(n/10,n%10))or n/10*2+1,-~r)or[n,r]

Try it online!
74 bytes
Full program.
n,i=input(),0
while n>9:i+=1;r,R=n/10,n%10;n=[r-~r,r/R+r%R][R&1]
print n,i

Try it online!

Since 2 divides 10, is n%10%2 not equivalent to n%2?

Great point by @JonathanFrech that will get you to 73 bytes.  I think the following form would also work, and is also 73 bytes: def g(n,r=0):u,v=n/10,n%10;return u and g([u-~u,u/v+u%v][v&1],r+1)or(n,r)

Somehow Jonathan's message did not appear in my inbox... Indeed, you're right, editing ASAP.

JavaScript (ES6), 62 59 bytes
f=(n,r=0)=>(x=n/10|0)?f((n%=10)&1?x/n+x%n|0:x-~x,r+1):[n,r]

Try it online!
Commented
f = (n, r = 0) =>         // n = input, r = number of iterations
  (x = n / 10 | 0) ?      // x = floor(n / 10); if x is not equal to 0:
    f(                    //   do a recursive call:
      (n %= 10) & 1 ?     //     n = last digit; if odd:
        x / n + x % n | 0 //       use quotient + remainder of x / n
      :                   //     else:
        x - ~x,           //       use x - (-x - 1) = x + x + 1 = 2x + 1
      r + 1               //     increment the number of iterations
    )                     //   end of recursive call
  :                       // else:
    [n, r]                //   return [ final_result, iterations ]

05AB1E (legacy), 19 bytes
[DgD–#ÁćDÈi\·>ë‰O]?

Explanation:
[                     Start infinite loop
 DgD                  Get the length
    –#                If it's 1, print the loop index and break.
      ÁćD             Extract: "hello" -> "hell", "o"
         Èi           if even,
           \·>        Double and increment
              ë       else,
               ‰O     Divmod, and sum the result (div and mod).
                 ]    End if statement & infinite loop
                  ?   Print

Try it online!

Julia 1.0, 81 80 79 bytes
function d(n,c=0)l,r=n÷10,n%10;n>9 ? d(r%2<1 ? 2l+1 : l÷r+l%r,c+1) : [n,c]end

Try it online!

-1 (thanks Mr. Xcoder)

Whis is my first golfcode :)

Welcome to PPCG!

Save a byte using <1 rather than ==0.

Ruby, 61 bytes
f=->n,r=0{n>9?(a=n%10;n/=10;f[a%2<1?n-~n:n/a+n%a,r+1]):[n,r]}

Try it online!

Retina, 79 bytes
(\d+)[02468]$
;$.(_2*$1*
(\d+)(.)
$2*_;$1*
}`(_+);(\1)*(_*)
;$.($3$#2*
^;*
$.&;

Try it online! Explanation:
(\d+)[02468]$
;$.(_2*$1*

If the last digit is even, multiply the rest of the integer by 2 and add 1. This always results in an odd number, so we don't need to repeat this.
(\d+)(.)
$2*_;$1*

Split off the last digit and convert to unary for the divmod.
}`(_+);(\1)*(_*)
;$.($3$#2*

Divide the rest of the integer by the last digit and add the remainder. Then repeat the whole program until there's only one digit left.
^;*
$.&;

Count the number of operations performed.

Perl 6, 61 bytes
{tail kv $_,{$1%2??$0/$1+$0%$1+|0!!$0*2+1}...{!/(.+)(.)/}: 2}

Try it online!
Returns (r, o).

Swift 4, 112 104 100 93 bytes
var n=Int(readLine()!)!,r=0,p=n%10;while n>9{n=[n/10*2+1,n/10/p+n/10%p][n%2];r+=1};print(n,r)

Try it online!
Prints n r

-7 (Thanks to Mr. Xcoder)

Very nice first answer (+1)! var n=Int(readLine()!)!,r=0,p=n%10;while n>9{n=[n/10*2+1,n/10/p+n/10%p][n%2];r+=1};print(n,r) should save you 7 bytes (golfing the conditional).

Brachylog, 43 bytes
Feels messy and bad but here it is anyway
;0{hl1&|⟨{h⟨k{t%₂0&h×₂+₁|⟨÷+%⟩}t⟩}↰₁{t+₁}⟩}

Try it online!

VBA (Excel), 145?, 142, 139, 123 bytes
Condensed Form:
Sub t(n)
While n>10
e=Right(n, 1)
n=Left(n,Len(n)-1)
If e Mod 2=0Then n=n*2+1 Else n=Int(n/e)+n Mod e
c=c+1
wend
Debug.?n;c
End Sub

Expanded (with comments)
Sub test(n) 'For a given positive integer n
    'Repeat the following until n<10
    While n > 10
        'Extract the last digit
        e = Right(n, 1)
        'Remove the last digit
        n = Left(n, Len(n) - 1)
        'If the extracted digit is even...
        If e Mod 2 = 0 Then
            'Multiply the rest of the integer by 2 and add 1
            n = n * 2 + 1
        Else
            'Divide the rest of the integer with the extracted digit and add the remainder
            n = Int(n / e) + n Mod e
        End If
        'Keep count
        c = c + 1
    'End the Loop
    Wend
    'Give the output
    Debug.Print (n ; c)
End Sub

(Do excuse me, as this is my first post. I will happily edit! Right now, it looks like to test it you open the Immediate Window and type 't n' where n is your number to test :D)

If you use an inline if statement ( IIf(..) ), integer division (\ ), and change the n>10 to n>9, then you can get this down to an immediate window function worth 97 bytes. n=[A1]:While n>9:e=Right(n,1):n=Left(n,Len(n)-1):n=IIf(e/2=e\2,n*2+1,n\e+n Mod e):c=c+1:Wend:?n;c

8086 machine code, 35 bytes
00000000  31 c9 31 d2 bb 0a 00 f7  f3 85 c0 74 14 f6 c2 01  |1.1........t....|
00000010  75 05 d1 e0 40 e2 eb 89  d3 88 f2 f7 f3 01 d0 e2  |u...@...........|
00000020  e1 f7 d9                                          |...|
00000023

Input: AX = n
Output: DX = o, CX = r
Assembled from:
        xor cx, cx
next:   xor dx, dx
        mov bx, 10
        div bx
        test ax, ax
        jz done
        test dl, 1
        jnz odd
        shl ax, 1
        inc ax
        loop next
odd:    mov bx, dx
        mov dl, dh
        div bx
        add ax, dx
        loop next
done:   neg cx

Jelly, 19 bytes
dd/Sɗ:Ḥ‘ɗḂ?Ƭ⁵ṖṖṪ,LƊ

Try it online!

Common Lisp, 145 bytes
A function which takes the n provided and returns the list (n r). Lisp syntax is fun.
(defun f(n &optional(r 0))(if(< n 10)`(,n,r)(let((h(floor n 10))(l(mod n 10)))(if(evenp l)(f(1+(* 2 h))(1+ r))(f(+(mod h l)(floor h l))(1+ r)))))

Welcome to the site =D

Thankyou very much, Luis.

Haskell, 78 bytes
f n|n<10=(n,0)|(d,m)<-divMod n 10=(1+)<$>f(last$2*d+1:[div d m+mod d m|odd n])

Try it online!

Red, 131 bytes
func[n][s: 0 while[n > 9][r: do form take/last t: form n t: do t
n: either r % 2 = 1[t / r +(t % r)][2 * t + 1]s: s + 1]print[n s]]

Try it online!
More readable:
f: func [ n ] [
    s: 0
    while [ n > 9 ] [
        r: do form take/last t: form n
        t: do t
        n: either r % 2 = 1
            [ t / r + (t % r) ]
            [ 2 * t + 1 ]
        s: s + 1
    ]
    print [ n s ]
]

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


text:
Impatient divisibility test
Your task is to write a program or function
that determines whether a number is divisible by another.
The catch is that it should give an answer as soon as possible,
even if not all digits of the number have been given.
Your program should take an integer D ≥ 2
and then a series of digits as input.
These represent the digits of another integer N ≥ 1,
starting at the least significant digit.
At the first point that N either must or must not be divisble by D,
your program should output the appropriate answer and exit.
If the end of the input is reached,
it should output whether the full N is divisible by D.
Here is a list of acceptable input formats for N
(leave a comment if you think something that isn't included should be allowed):

Standard input:
digits are given on separate lines;
end of input is EOF or a special value;
exit means that the function returns or the program exits.
Analog input:
through e.g. keystrokes or ten buttons representing each digit;
end of input is a special value;
exit means that the function returns or the program exits.
Function with global state:
called repeatedly with successive digits;
end of input is a special value;
exit means that the function returns a non-null value.
Note that if you use global state,
it must be cleared after a value is returned
or otherwise reset such that the function works multiple times.
Curried function:
returns either another function to be called with the next digit or a value;
end of input is a special value or calling the function with no argument;
exit means that the function returns an answer rather than another function.
GUI prompt or similar:
displayed repeatedly;
end of input is "cancel" or equivalent, or a special value;
exit means that prompts stop appearing.
Iterator function:
input is a stateful object or function that returns the next digit when called,
end of input is an exception or special value;
exit means that the iterator stops being called.

Input for D and the output
can be through any acceptable standard method.
Test cases:
2;   6               => true
5;   6               => false
20;  0 3             => false
20;  0 4             => true
100; 1               => false
100; 0 0             => true
100; 0 2             => false
4;   2 4             => false
4;   2 5             => true
4;   2 [eof]         => false
4;   4 [eof]         => true
625; 5 5             => false
625; 5 7 2           => false
625; 5 7 3 6         => false
625; 5 7 3 4         => true
7;   9 3 4 [eof]     => false
7;   9 3 4 5 [eof]   => true
140; 0 3             => false
140; 0 4 5 [eof]     => false
140; 0 4 5 1 [eof]   => true
14;  4 5 1 4 [eof]   => false
14;  4 5 1 4 1 [eof] => true

I think we should assume that one digit will be given every time our solution asks for input, right? And, it should be a full program, since this is the objective way to ensure that input is given digit by digit, no? (The challenge says "program or function", hmm...)

@EriktheOutgolfer The input format is explained in detail in the bulleted list in the question.

I was just thinking about how objective can those formats be...I guess I'll just quit nitpicking and start actually solving this. :-)

Hm, can I actually put the digits in STDIN without them being separated by linefeeds? "Standard input: digits are given on separate lines [...]"

@EriktheOutgolfer STDIN is typically line-buffered; if you can read one character at a time, it's effectively equivalent to the second bullet point.

Well, almost, but EOT will have to be explicit after each digit (so that the terminal feeds the input to the program), that's why I didn't compare it to the second bullet point.

Is anything wrong with just taking a list as the digits input with a special value for EOF?

@JonathanAllan I'm pretty sure that, if you take a list, then you've already taken it all at once.

@EriktheOutgolfer not if there is an EOF value, unless I've misunderstood something. For example let's say the whole value is 132 and the potential divisor is 4 then [] and [2] return anything other than false or true (including the function itself etc...) while [2,3], [2,3,1], and [2,3,1,EOF] return true. It strikes me as close to the global state option.

Would a function taking an iterator be ok?

@JonathanAllan Being able to access all the input at the same time would eliminate the work involved in accumulating the input, and the idea is that the program takes input one digit at a time and stops as soon as possible (hence "impatient"). It shouldn't be possible to provide an input of [2,3,1], as the program should have stopped after the 3 digit.

@wastl Yes, I've edited the post.

That was not the suggestion - the first call would be with [], the second with [2], the third with [2, 3] (at which point true would be returned), the enumeration of all possibilities was to show that the EOF would be given if we get to the whole number being given.

JavaScript (ES6), 70 bytes
Input format: Curried function
A function that takes the divisor and returns a function that takes each digit or \$-1\$ for EOF. The second function returns either \$0\$ (false), \$1\$ (true) or itself (no answer).
p=>(q='',g=(d,t=k=z=!~d||(q=d+q,p))=>k--?g(d,t-=(k+q)%p<1):t?t-z&&g:1)

Try it online!
How?
Given a divisor \$p\$ and a dividend \$q\$ consisting of \$n\$ decimal digits, we compute the following expression for all \$0 \le k < p\$:
$$k\times 10^n+q \pmod p\tag{1}$$
For any \$x\ge p\$ there exists \$m\ge 1\$ and \$0 \le k < p\$ such that \$x=mp+k\$, leading to:
$$x\times 10^n+q \pmod p=\\
(mp+k)\times 10^n+q \pmod p=\\
(mp\times 10^n \pmod p)+ (k\times 10^n+q \pmod p)\pmod p=\\
0+(k\times 10^n+q \pmod p)\pmod p=\\
k\times 10^n+q \pmod p$$
Therefore, if \$(1)\$ is equal to \$0\$ for all \$0 \le k < p\$, it will also be equal to \$0\$ for any \$k \ge p\$ and the answer is true.
For the same reason, if \$(1)\$ is greater than \$0\$ for all \$0 \le k < p\$, the answer is false.
If the results of \$(1)\$ are mixed, we can't decide yet and need either more digits of \$q\$ or the EOF notification.
Commented
p => (                       // p = divisor
  q = '',                    // q = dividend stored as a string, initially empty
  g = (                      // g() = curried function taking:
    d,                       //   d = next digit
    t =                      //   t = number of iterations yielding a non-zero value
    k =                      //   k = total number of iterations to process
    z =                      //   z = copy of k
      !~d ||                 //   if d == -1 (meaning EOF), use only 1 iteration
                             //   so that we simply test the current value of q
      (q = d + q, p)         //   otherwise, prepend d to q and use p iterations
  ) =>                       //
    k-- ?                    //   decrement k; if it was not equal to zero:
      g(                     //     do a recursive call to g():
        d,                   //       pass the current value of d (will be ignored anyway)
        t -= (k + q) % p < 1 //       test (k + q) % p and update t accordingly
      )                      //     end of recursive call
    :                        //   else:
      t ?                    //     if t is greater than 0:
        t - z && g           //       return 0 if t == z, or g otherwise
      :                      //     else:
        1                    //       return 1
)                            //

Batch, 177 169 bytes
@set n=
@set g=1
:l
@set/ps=
@if %s%==- goto g
@set n=%s%%n%
@set/ae=%1/g,g*=2-e%%2,g*=1+4*!(e%%5),r=n%%g
@if %g% neq %1 if %r%==0 goto l
:g
@cmd/cset/a!(n%%%1)

Takes d as a command-line parameter and reads digits of n on separate lines with - as the EOF marker. Outputs 1 for divisible, 0 if not. Explanation:
@set n=

Initialise n to the empty string.
@set g=1

g is gcd(d, 10**len(n))
:l

Begin a loop reading digits.
@set/ps=

Read the next digit.
@if %s%==- goto g

Stop processing at EOF.
@set n=%s%%n%

Prepend the next digit to n.
@set/ae=%1/g,g*=2-e%%2,g*=1+4*!(e%%5),r=n%%g

Update g now that len(n) has increased and calculate n%g.
@if %g% neq %1 if %r%==0 goto l

If r is non-zero then the d definitely does not divide n, because g, a factor of d, does not. If r is zero then we only know whether d divides n if g equals d, so if it isn't, continue the loop.
:g

Break out of the digit-reading loop here on EOF.
@cmd/cset/a!(n%%%1)

Calculate and implicitly output the result.


text:
Repeat a rhyme and loop on the vowels
Vowels rhyme: Apples and Bananas
There is a traditional children's song that repeats the same text over and over, only each time every vowel is replaced with a random vowel, but constant across the current stanza.
Challenge
The objective is to propose the shortest code that performs such a transformation on an input text.
Rules

You must print the rhyme as many times as there are distinct vowels in it.
Each print must be separated with a line break (platform-specific combo of \n and \r is accepted).
For iteration i, replace each vowel with the ith distinct vowel in the original text.
The input text is a sequence of printable ASCII characters (range [32, 126].
Input will not contain embedded line breaks.
Only vowels characters must be affected, other must be output exactly as input.
Only vowels characters count: nasal vowels, although sounding like vowels (like in French "Tintin"), must not be handled as a single vowel.
Case matters for the output, but is positional (replacing an uppercase vowel is done with the uppercase replacement vowel)
Uppercase vowels are not distinct from their lowercase counterpart (ie a <=> A)
Consecutive vowels are always considered separately (ie. Boat yields both Boot and Baat)
Since the letter y represents either a vowel or consonant soun (as we're speaking English), handling it as a vowel or a consonant is allowed, however answers must explicitly state whether they handle y as a vowel or not.

Examples:
Hello world
Hello world!

gives:
Helle werld!
Hollo world!

Excerpt from the original French text (translated), with y handled as a vowel:
An elephant that was rambling all gently in the woods...

gives:
An alaphant that was ramblang all gantla an tha waads...
En elephent thet wes rembleng ell gentle en the weeds...
In iliphint thit wis rimbling ill gintli in thi wiids...
Yn ylyphynt thyt wys rymblyng yll gyntly yn thy wyyds...
On olophont thot wos romblong oll gontlo on tho woods...

Note the behaviour on leading uppercase vowel: case is kept at its index (rules 8 and 9).
Vowelless example
Input that does not contain any vowel, like:
lgn@hst:~$ rm -rf ./* ~ /

must produce no output, or a single line break.
Single-vowel input
Input containing a single vowel is output as is.
Dad sat at a car and saw a fat bat.

gives:
Dad sat at a car and saw a fat bat.

This is code-golf, so fewest bytecount code wins (nothing but eternal PPCG glory)!

Retina, 45 bytes
~(K`A\EI\OU
L$`\\?(.)
./$1/i&$*\T`Vv`5*$&$L$&

Try it online! Does not count y as a vowel. Explanation:
K`A\EI\OU

Replaces the text with the literal string A\EI\OU.
L$`\\?(.)

Matches each letter optionally preceded by a backslash.
./$1/i&$*\T`Vv`5*$&$L$&

Outputs a line of Retina code for each letter.
~(

Evaluates the generated code (shown below) using the original input. The . causes the code not to output the (final) buffer. The /<vowel>/i& causes the rest of the line to run only if the input contains the given vowel (case-insensitively). The * causes the result of the line to be ignored, so that the next vowel can be tested. The \ causes the result to be printed on its own line before it is ignored. The T`Vv`AAAAAa transliterates uppercase Vowels to AAAAAs and all lowercase vowels to a. \A is an escape that refers to ASCII 07 (BEL), but E, O and o are built-in character classes that needs to be escaped to give their literal values (e is not a character class, but fortunately it is also not an escape.)
./A/i&*\T`Vv`AAAAAa
./E/i&*\T`Vv`\E\E\E\E\E\e
./I/i&*\T`Vv`IIIIIi
./O/i&*\T`Vv`\O\O\O\O\O\o
./U/i&*\T`Vv`UUUUUu

Mmh, self-generating code. I don't know Retina well but that's impressive!

@joH1 Well, for me the impressive bit is that it saved 60 bytes!

Ruby, 78 bytes
->s{s.downcase.scan(/[aeiou]/).uniq.map{|v|s.tr"AEIOUaeiou",v.upcase*5+v}*?\n}

Try it online!
A quick and naive approach. Y is not considered a vowel.

Japt v2.0a0 -R, 24 22 bytes
Treats y as a vowel. Change both occurences of \y to \v to treat it as a consonant.
v f\y â £r\y_Xc^H*ZøZu

Try it

Explanation
v                          :Lowercase
   \y                      :RegEx /[aeiouy]/gi (\v is /[aeiou]/gi)
  f                        :Get all matches as an array
      â                    :Deduplicate
        £                  :Map each X
         r\y               :  Replace all matches of the RegEx above in the input
             _             :  Pass matches through a function as Z
              Xc^          :    XOR the character code of X with
                 H*        :     32 multiplied by
                   Zø      :     Does Z contain
                     Zu    :      Uppercase Z
                           :Implicitly join with newlines and output

bash, 96 bytes
Two equal-length solutions:
v=aeiouAEIOU;for x in `grep -o [$v]<<<$1|sed 's/./\L&&&&&\U&/'|awk !a[\\$0]++`;{ tr $v $x<<<$1;}
v=aeiouAEIOU;for x in `tr -cd $v<<<$1|sed 's/./\L&&&&&\U&\n/g'|awk !a[\\$0]++`;{ tr $v $x<<<$1;}

Try it online!
Takes input as a command line argument and outputs to STDOUT.

05AB1E (legacy), 19 bytes
(Indirectly) saved one byte thanks to Kevin (printing directly inside the loop rather than joining, only work in the legacy version).
lžMÃÙεžMDu«s5×Du«‡=

Try it online!
Using the Elixir rewrite,  20 bytes
lžMÃÙεžMDu«s5×Du«‡}»

Try it online! (without y) | Try it online! (with y, žM being replaced by žO – same applies for the legacy version)
How it works
lžMÃÙεžMDu«s5×Du«‡}»     Full program. Example: "Hello"
l                        Convert the input to lowercase. "Hello" –> "hello"
 žMÃ                     Keep only lowercase vowels. "hello" –> "eo"
    Ù                    Remove duplicates. "eo" –> "eo"
     ε            }      For each of the characters (example with "e"):
      žMDu«              Yield "aeiouAEIOU"
           s5×           Swap, and repeat the current char 5 times. "e" –> "eeeee"
              Du«        Duplicate, uppercase and merge. "eeeee" –> "eeeeeEEEE"
                 ‡       Transliteration. For each item in B, replace it in A with
                         the corresponding item in C.
                   »     Join on newlines.

Nice answer, shorter than the 21 byte answer I prepared. You can golf one more byte by looping and printing instead of mapping: 19 bytes. Your TIO with y should also use 6 instead of 5, btw.

@KevinCruijssen Edited, thanks! About the y-vowel version, I accidentally copied the wrong TIO link when I answered :|...

Ah, now I know again why I had the i in my code.. Your answer fails for inputs without vowels. Expected is an empty output, but it actually prints the input itself.. :(

@KevinCruijssen The 20-byter works, so I rolled back and fixed the second link.

Jelly,  23 20 18  17 bytes
-2 Thanks to Erik the Outgolfer
ØcŒHZx5fƇðØc,yð€Y

To treat y as a vowel replace both cs with ys.
Try it online!
How?
ØcŒHZx5fƇðØc,yð€Y - Link: list of characters, S
Øc                - vowels -> "AEIOUaeiou"
  ŒH              - split in half -> ["AEIOU", "aeiou"]
    Z             - transpose -> ["Aa", "Ee", "Ii", "Oo", "Uu"]
     x5           - times 5 -> ["AAAAAaaaaa", "EEEEEeeeee", "IIIIIiiiii", "OOOOOooooo", "UUUUUuuuuu"]
        Ƈ         - filter keep if:
       f          -   filter keep only -> those of X which have required vowels
                  -                       ...i.e. if S = "blah" then ["AAAAAaaaaa"]
         ð    ð€  - dyadic chain for €ach:
          Øc      -   vowels -> "AEIOUaeiou"
            ,     -   pair       e.g. ["AEIOUaeiou","AAAAAaaaaa"]
             y    -   translate  e.g. swap A for A, E for A, ...
                Y - join with newlines

18 bytes (trivial) (ż/ on a pair is Z, two dyads in a row where the left one is unpaired in a monad have the argument in-between implicitly)

Thanks (Z >_<), not sure what was going on with my TIO session, but removing the redundant ð wasn't working; restart fixed.

TBH, I actually fixed x€ → x too, but you ninja'd me. :P

Red, 229 bytes
Taking y for a non-vowel
func[s][v: charset"aoeiu"w: charset"AOEIU"p: copy""parse s[any[[copy c[v | w](if not find p c[append p c lowercase c
parse s[any[[copy n to[v | w | end]](prin n)opt[v(prin c)|[w(prin uppercase copy c)]| skip]]]print""])]| skip]]]

Try it online!
Slightly more readable:
f: func [ s ] [
    v: charset "aoeiu"
    w: charset "AOEIU"
    p: copy ""
    parse s[
        any [
            [ copy c [ v | w ]
                ( if not find p c [
                    append p c
                    lowercase c
                    parse s [
                        any [
                            [ copy n to [ v | w | end ] ]
                                 ( prin n )
                            opt [ v ( prin c )
                                | [ w ( prin uppercase copy c ) ]
                                | skip
                                ]
                            ]
                        ]
                    print ""
                ] )
            ]
            | skip
        ]
    ]
]

R, 138, 129 bytes
function(x,U=utf8ToInt,a=U(V<-'aeiouAEIOU'))for(i in (which(a%in%U(x))-1)%%5)cat(chartr(V,intToUtf8(rep(a[i+c(1,6)],e=5)),x),'
')

Try it online!

y is not considered a vowel

Python, 129 119 112 bytes
import re
f=lambda s:'\n'.join(r('[AEIOU]',v.upper(),r('[aeiou]',v,s))for v in'aeiou'if v in s.lower());r=re.sub

Try it Online!
Doesn't treat \$y\$ as vowel.
-7 bytes thanks to @Mr.Xcoder

Glad to see you could get it working and golfed down a bit! Nice work

112 bytes.

JavaScript (Node.js), 99 bytes
Treats \$y\$ as a consonant.
s=>(g=F=>Buffer(s).map(c=>2130466>>c&c>64?F(c):c)+`
`)(v=>g[v&=31]||(g[v]=S+=g(c=>c&96|v)),S='')&&S

Try it online!
Commented
s => (                   // s = input string
  g = F =>               // g = helper function taking a callback function F
    Buffer(s)            // turn s into a Buffer
    .map(c =>            // for each ASCII code c in s:
      2130466            //   2130466 is a vowel bitmask: 1000001000001000100010
                         //                               u     o     i   e   a
      >> c               //   the ECMAScript specification enforces that the shiftCount is
                         //   the result of masking out all but the least significant 5 bits
      & c > 64           //   also make sure to ignore non-letter characters
      ?                  //   if a vowel is identified:
        F(c)             //     invoke F with c
      :                  //   else:
        c                //     just yield c
    ) + `\n`             // end of map(); coerce back to a string and append a newline
  )(v =>                 // invoke g with a callback that takes v:
    g[v &= 31] || (      //   unless this vowel has already been encountered:
      g[v] =             //     mark it as encountered
      S +=               //     and append to the output string S
      g(                 //     the result of another call to g:
        c => c & 96 | v  //       where vowels are replaced with v, using the original case
      )                  //     end of inner call to g
    ),                   //
    S = ''               //   start with S = ''
  ) && S                 // end of outer call to g; return S

Java 10, 196 188 bytes
s->{var d=new int[99];for(var c:s.toUpperCase().replaceAll("[^AEIOU]","").toCharArray())if(d[c]++<1)System.out.println(s.replaceAll("[AEIOU]",c+"").replaceAll("[aeiou]",(char)(c+32)+""));}

-8 bytes thanks to @joH1.
Without y as vowel to save bytes.
Try it online.
Explanation:
s->{                       // Method with String parameter and no return-type
  var d=new int[99];       //  Integer-array indicating which vowels we've already output
  for(var c:s.toUpperCase()//  Convert the input to uppercase
            .replaceAll("[^AEIOU]","")
                           //  Remove all non-vowels
            .toCharArray())//  Convert it to a character array)
                           //  And loop over those vowel-characters
    if(d[c]++              //   Increase the vowel-count by 1
             <1)           //   And if it was 0 this iteration:
      System.out.println(  //    Print with trailing newline:
        s                  //     The input,
         .replaceAll("[AEIOU]",c+"")
                           //     with every uppercase vowel replace with the current vowel
         .replaceAll("[aeiou]",(char)(c+32)+""));}
                           //     and every lowercase vowel replaced as well

188 bytes by inlining the variable v in the loop

@joH1 Thanks, not sure how I missed that..

Python 2, 112 bytes
s=input()
V='aeiouAEIOU'
for v in V:
 if v in s.lower():print''.join([c,[v.upper(),v][c>'Z']][c in V]for c in s)

Try it online!
Treats y as a consonant.

Perl 6, 64 bytes
{m:g:i/<[aeiou]>/».lc.unique».&{$^v;say S:g:ii[<[aeiou]>]=$v}}

Try it online!

Java (OpenJDK 8), 184 bytes
y is a vowel
s->s.chars().mapToObj(c->""+(char)(c>96?c:c+32)).filter("aeiouy"::contains).distinct().forEach(c->System.out.println(s.replaceAll("[aeiouy]",c).replaceAll("[AEIOUY]",c.toUpperCase())))

Try it online!


text:
Simulate an NFA
A nondeterministic finite automaton is a finite state machine where a tuple \$(state,symbol)\$ is mapped to multiple states. Ie. we replace the usual \$\delta : Q \times \Sigma \to Q\ \$ transition function of a DFA with another function \$\Delta : Q \times \Sigma \to \mathcal{P}(Q)\$.
If you know what an NFA is you might want to skip the next section.
Formal Definition
An NFA is uniquely described by

\$Q\$ a finite set of states
\$\Sigma\$ a finite set of symbols
\$\Delta : Q \times \Sigma \to \mathcal{P}(Q)\$ the transition function
\$q_0 \in Q\$ the initial state
\$F \subseteq Q\$ a set of final states

The machine starts out in \$q_0\$ and reads a finite string of symbols \$w \in \Sigma^*\$, for each symbol it will simultaneously apply the transition function function with a current state and add each new set of states to the set of current states.
Challenge
For this challenge we will ignore \$F\ \$ to simplify it, furthermore the alphabet will always be the (lower-case) letters \$\texttt{a}\ \$ to \$\texttt{z}\ \$ and the set of states will be \$\{0 \dots N\}\$ for some non-negative integer \$N\$. The initial state will always be \$0\$.
Given a word \$w \in \{\texttt{a}\dots\texttt{z}\}^*\$ and a description of the NFA, your task is to determine all the final states.
Example
Consider the string \$\texttt{abaab}\$ and the following description:
state, symbol, new-states
0, 'a', [1]
1, 'a', [0]
1, 'b', [1,2]

The machine will start in \$q_0 = 0\$:

read an \$\texttt{a}\$: new states \$\{1\}\$
read a \$\texttt{b}\$: new states \$\{1,2\}\$
read an \$\texttt{a}\$: new states \$\{0\}\$
read an \$\texttt{a}\$: new states \$\{1\}\$
read a \$\texttt{b}\$: new states \$\{1,2\}\$

So the final states and thus the output would be \$\{1,2\}\$.
Note: In step (2) the transition of state \$2\$ maps to \$\emptyset\$ as the description only includes transitions to non-empty sets.
Rules
The input will consist of a string and some kind of description of the NFA (without \$\epsilon\$-transitions):

the input string will always be element of \$\{\texttt{a}\dots\texttt{z}\}^*\$
valid inputs (not limited to):

list/array of tuples/lists
new-line separated input

the description of the NFA will only contain transitions with non-empty sets as result

you may abbreviate rules with the same characters if their result is the same (eg. rules 0,'a',[1,2] and 0,'b',[1,2] could be abbreviated with 0,"ab",[1,2]
you may take each rule separate (eg. rule 0,'a',[1,2] can be 0,'a',[1] and 0,'a',[2])

you may choose upper-case letters if you want
you may take the number of states as input
you may assume some kind of ordering of the inputs (eg. ordered by state or symbols)

The output will be a list/set/new-line separated output etc. of the final states

order doesn't matter
no duplicates (as it's a set)

Test cases
These examples will be in the format description  word -> states where description is a list of tuples (state,symbol,new-states):
[]  "x" -> []
[]  "" -> [0]
[(0,'a',[1]),(1,'a',[0]),(1,'b',[1,2])]  "abaab" -> [1,2]
[(0,'a',[1]),(1,'a',[0]),(1,'b',[1,2])]  "abc" -> []
[(0,'p',[0,1]),(0,'g',[2]),(1,'c',[1]),(1,'g',[4]),(1,'p',[2]),(2,'c',[0])]  "ppcg" -> [2,4]
[(0,'f',[1]),(1,'o',[1,2]),(2,'b',[3]),(3,'a',[4]),(4,'r',[0,4])]  "foobar" -> [0,4]
[(0,'f',[1]),(1,'o',[1,2]),(2,'b',[3]),(3,'a',[4]),(4,'r',[0,4])]  "fooooooobar" -> [0,4]
[(0,'f',[1]),(1,'o',[1,2]),(2,'b',[3]),(3,'a',[4]),(4,'r',[0,4])]  "fobarfo" -> [1,2]
[(0,'f',[1]),(1,'o',[1,2]),(2,'b',[3]),(3,'a',[4]),(4,'r',[0,4])]  "foobarrf" -> [1]
[(0,'d',[1,2]),(1,'u',[2]),(2,'u',[2,3]),(2,'p',[3]),(3,'p',[3])]  "dup" -> [3]
[(0,'a',[0,2]),(0,'b',[3]),(1,'a',[1]),(1,'b',[1]),(2,'b',[1,4]),(4,'b',[2])]  "aab" -> [3,1,4]
[(0,'a',[0,2]),(0,'b',[3]),(1,'a',[1]),(1,'b',[1]),(2,'b',[1,4]),(4,'b',[2])]  "abb" -> [1,2]

related

This brings back scary memories from my automaton course.

Can we take input with individual lines for each new state, e.g. this for worked example?

@ovs: Sure go ahead!

Haskell, 66 bytes
import Data.List
f d=foldl(\s c->nub[r|(y,r)<-d,g<-s,(g,c)==y])[0]

Try it online!

You can get rid of the import for nub if you assume the states to be [Int], then you can use check each [0..] which is finite: 60 bytes

@BWO This iterates over all Ints and over all current states and therefore still produces duplicate states. Example (changed [0..] to [0..3] for testing purposes, but this should not make a difference, right?)

Yeah, not sure what I was thinking.. Nevermind..

Brachylog v2, 31 bytes
{b,Ȯ,Ȯ\c↔,0↔ġ₃kH&hg;Hz{∋ᵈ}ᵐtt}ᵘ

Try it online! (or with a more complex example)
Brachylog is really good at this sort of problem, and really bad at problems that require two separate inputs and an output. Almost all of this program is just plumbing.
Input format is a list containing two elements: the first is the list of state transitions ([oldState, symbol, newState]), and the second is the list of symbols. I originally planned this program to work with character codes for symbols (because Brachylog's string handling can be a bit weird sometimes), but it turns out that characters work too (although you have to write the input string as a list of characters, not as a string). If a state-symbol pair can transition to multiple different states, you write multiple transitions to deal with that.
Explanation
{b,Ȯ,Ȯ\c↔,0↔ġ₃kH&hg;Hz{∋ᵈ}ᵐtt}ᵘ
{                            }ᵘ   Find all distinct outputs that can result from:
 b                                  taking the input minus its first element,
  ,Ȯ                                appending a singleton list (i.e. an element)
    ,Ȯ                              then appending that same element again
      \                             and transposing;
       c                            then concatenating the resulting lists,
        ↔,0↔                        prepending a 0,
            ġ₃                      grouping into blocks of 3 elements
              k                       (and discarding the last, incomplete, block),
               H&                   storing that while we
                 h                  take the first input element,
                  g  z              pair a copy of it with each element of
                   ;H                 the stored value,
                      {  }ᵐ         assert that for each resulting element
                       ∋ᵈ             its first element contains the second,
                        ᵈ ᵐ           returning the list of second elements,
                            t       then taking the last element of
                           t          the last element.

It's probably easier to follow this by looking at what some partial versions of the program would produce. Using the following input each time:
[[[0,97,1],[1,97,0],[1,98,1],[1,98,2]],[97,98,97,97,98]]

we can observe the outputs of some prefixes of this program:
[[[0,97,1],[1,97,0],[1,98,1],[1,98,2]],[97,98,97,97,98]]b,Ȯ,Ȯ
[[97,98,97,97,98],L,L]

[[[0,97,1],[1,97,0],[1,98,1],[1,98,2]],[97,98,97,97,98]]b,Ȯ,Ȯ\
[[97,A,A],[98,B,B],[97,C,C],[97,D,D],[98,E,E]]

[[[0,97,1],[1,97,0],[1,98,1],[1,98,2]],[97,98,97,97,98]]b,Ȯ,Ȯ\c↔,0↔
[0,97,A,A,98,B,B,97,C,C,97,D,D,98,E,E]

[[[0,97,1],[1,97,0],[1,98,1],[1,98,2]],[97,98,97,97,98]]b,Ȯ,Ȯ\c↔,0↔ġ₃k
[[0,97,A],[A,98,B],[B,97,C],[C,97,D],[D,98,E]]

[[[0,97,1],[1,97,0],[1,98,1],[1,98,2]],[97,98,97,97,98]]b,Ȯ,Ȯ\c↔,0↔ġ₃kH&hg;Hz
[[[[0,97,1],[1,97,0],[1,98,1],[1,98,2]],[0,97,A]],
 [[[0,97,1],[1,97,0],[1,98,1],[1,98,2]],[A,98,B]],
 [[[0,97,1],[1,97,0],[1,98,1],[1,98,2]],[B,97,C]],
 [[[0,97,1],[1,97,0],[1,98,1],[1,98,2]],[C,97,D]],
 [[[0,97,1],[1,97,0],[1,98,1],[1,98,2]],[D,98,E]]]

[[[0,97,1],[1,97,0],[1,98,1],[1,98,2]],[97,98,97,97,98]]b,Ȯ,Ȯ\c↔,0↔ġ₃kH&hg;Hz{∋ᵈ}ᵐ
e.g. [[0,97,1],[1,98,1],[1,97,0],[0,97,1],[1,98,1]]

For the first example here, L is initially an unknown element, but when we transpose it via \, Brachylog realises that the only possibility is a list with the same length as the input. The last example here is nondeterministic; we're modelling nondeterminism in the NFA using the nondeterminism in Brachylog itself.
Possible improvements
Some of the syntax here, like ↔,0↔ and especially the mess with H&hg;Hz{…ᵈ}ᵐ, is fairly clunky. It wouldn't surprise me if there were a terser way to phrse this.
{∋ᵈ}ᵐ is in its own right a fairly suspicious structure – you'd expect to just be able to write ∋ᵈᵐ – but it doesn't parse for some reason.

∋ᵈᵐ doesn't parse because it is implemented such that multi-character meta-predicate names could in theory be used (if we ran out of single-symbol possibilities). In practice it's not currently used.

Brachylog, 42 bytes
,0{hẸ&t|∋₁B∋IhJ&tJ&hhC∧I∋₁C∧It∋S&hb;B,S↰}ᵘ

input as [string, nfa]
where nfa is a list of state transitions [ initial state, letter, new states as list ]
Explanation
,0                                              # Append 0 to the input (initial state)
  {                                      }ᵘ     # Find all unique outputs
   h                                            # if first element (string)
    Ẹ                                           #   is empty
     &t                                         #   then: return last element (current state)
       |                                        #   else:
        ∋₁B                                     #       save the state transitions in "B"
           ∋I                                   #       take one of these transitions, save in "I"
             hJ                                 #       take the initial state requirement, store in "J"
               &tJ                              #       make sure "J" is actually the current state
                  &hhC                          #       Save first char of string in C
                      ∧I∋₁C                     #       make sure the char requirement for the state transition is the current char
                           ∧It∋S                #       Make "S" equal to one of the new states
                                &hb             #       Behead the string (remove first char)
                                   ;B,S         #       Add B (the state transitions) and S (the new state)
                                       ↰        #       recur this function

Try it online!

JavaScript (ES6), 99 bytes
Takes input as (nfa)(string). Returns a Set.
a=>g=([c,...b],s=[0])=>c?g(b,a.reduce((p,[x,y,z])=>s.includes(x)&y==c?[...p,...z]:p,[])):new Set(s)

Try it online!

Python 3, 103 80 bytes
thanks to @BWO
w=lambda n,f,a={0}:w(n,f[1:],{y for(x,c,y)in n if c==f[0]and{x}&a})if''<f else a

TIO
Previous "elegant" list comprehension(103 bytes):
def w(a,b):
    q=[0]
    for c in b:q=[j for s in q for i in a if s in i if i[1]==c for j in i[2]]
    return q

Shame that Python 3 lacks reduce.. But using recursion and actual sets still brings you down to 80 bytes.

@BWO nice, thanks, haha btw the above is my new favorite example python code to show... one line giant list comprehensions amuse me way more than they should

I think you can save 2 bytes by replacing if''<f with if f.

@Chas Brown that fails if f is a falsy value such as empty string

Actually, what am I saying, ignore that

R, 81 bytes
function(a,b,e,s)Reduce(function(A,x)unique(e[a%in%A&b==x]),el(strsplit(s,"")),0)

Try it online!
Straightforward answer using Reduce. Takes rules as three vectors of state, symbol, new-states called a,b,e.
Rules are separate (eg. rule 0,'a',[1,2] is 0,'a',1 and 0,'a',2).

Coconut, 64 bytes
d->reduce$((s,c)->{r for(*y,r)in d for S in s if[S,c]==y},?,{0})

Try it online!

Clean, 68 bytes
This one based on ovs's Haskell solution is a bit shorter than my initial approach was.
now includes a test harness
import StdEnv
?d=foldl(\s c=removeDup[r\\(y,r)<-d,g<-s|(g,c)==y])[0]

Try it online!

@BWO Test harness added

Perl 6, 61 54 bytes
->\n,\s{set +s&&reduce {n.grep(*[^2]⊆@_)[*;2]},0,|s}

Try it online!
Takes a list of state transitions and an input string as list of characters.

Charcoal, 44 bytes
⊞υ⁰Ｆη«≔υζ≔⟦⟧υＦζＦθ¿∧⁼§λ⁰κ⁼§λ¹ιＦ§λ²¿¬№υμ⊞υμ»Ｉυ

Try it online! Link is to verbose version of code. Explanation:
⊞υ⁰

Push 0 to the predefined empty list to set the inital state to \$\{0\}\$.
Ｆη«

Loop over the input.
≔υζ

Copy the state.
≔⟦⟧υ

Reset the state.
Ｆζ

Loop over the copy of the state.
Ｆθ

Loop over the NFA entries.
¿∧⁼§λ⁰κ⁼§λ¹ι

If the entry matches, then...
Ｆ§λ²

... loop over the new states...
¿¬№υμ

.... if they are not already in the list...
⊞υμ»

... add them to the list.
Ｉυ

Cast the list of states to string for implicit output on separate lines.

Japt, 31 bytes
W=[W]c;Ê?ßUÅVVf!øW føUg)mÌc):Wâ

Try it!
Saved 2 bytes with better use of Japt's ability to implicitly form a function out of some inputs
Explanation:
W=[W]c;                            Initialize the state set to [0] on the first run
       Ê?                   :Wâ    If the input is empty return the unique states; else...
             Vf!øW                 Get the transitions valid for one of the current states
                   føUg)           Of those, get the ones valid for the current character
                        mÌc)       Merge the states of the remaining transitions
         ßUÅV                      Repeat with the remaining characters as input

The new "initialize states" code could use a bit more detail. Japt initializes W to 0 if there are fewer than 3 inputs, so on the first run [W] is [0], and c "flattens" an array. [0] is already as flat as it gets, so it isn't changed. On subsequent runs W has a different value, for example [1,2]. In that case [W] becomes [[1,2]], a single-element array where that element is an array. This time c unwraps that and gets back to [1,2]. Thus, on the first run it's W=[0] and on subsequent runs it's W=W.


text:
Chop off the matrix to get the desired sum
Definition
Given a matrix \$M\$ of non-negative integers and a non-negative integer \$k\$, we define \$F_k\$ as the "chop-off" function that removes all rows and all columns in \$M\$ that contain \$k\$.
Example:
$$\begin{align}M=\pmatrix{\color{red}6&\color{red}1&\color{white}{\bbox[red,1pt]{5}}\\1&2&\color{red}8\\\color{red}9&\color{red}8&\color{white}{\bbox[red,1pt]{5}}\\6&0&\color{red}4}\\\\F_5(M)=\pmatrix{1&2\\6&0}\end{align}$$
Your task
Given \$M\$ and a target sum \$S\$, your task is to find all possible values of \$k\$ such that the sum of the remaining elements in \$F_k(M)\$ is equal to \$S\$.
Example:
Given the above matrix \$M\$ and \$S=9\$:

\$k=5\$ is a solution, because \$F_5(M)=\pmatrix{1&2\\6&0}\$ and \$1+2+6+0=9\$
\$k=1\$ is the only other possible solution: \$F_1(M)=\pmatrix{5\\4}\$ and \$5+4=9\$

So the expected output would be \$\{1,5\}\$.
Clarifications and rules

The input is guaranteed to admit at least one solution.
The sum of the elements in the original matrix is guaranteed to be greater than \$S\$.
You may assume \$S>0\$. It means that an empty matrix will never lead to a solution.
The values of \$k\$ may be printed or returned in any order and in any reasonable, unambiguous format.
You are allowed not to deduplicate the output (e.g. \$[1,1,5,5]\$ or \$[1,5,1,5]\$ are considered valid answers for the above example).
This is code-golf.

Test cases
M = [[6,1,5],[1,2,8],[9,8,5],[6,0,4]]
S = 9
Solution = {1,5}

M = [[7,2],[1,4]]
S = 7
Solution = {4}

M = [[12,5,2,3],[17,11,18,8]]
S = 43
Solution = {5}

M = [[7,12],[10,5],[0,13]]
S = 17
Solution = {0,13}

M = [[1,1,0,1],[2,0,0,2],[2,0,1,0]]
S = 1
Solution = {2}

M = [[57,8,33,84],[84,78,19,14],[43,14,81,30]]
S = 236
Solution = {19,43,57}

M = [[2,5,8],[3,5,8],[10,8,5],[10,6,7],[10,6,4]]
S = 49
Solution = {2,3,4,7}

M = [[5,4,0],[3,0,4],[8,2,2]]
S = 8
Solution = {0,2,3,4,5,8}

Would retaining the original structure of the input array (e.g., [[1,5],[1],[5],[]] for the first test case) be a valid means of output?

@Shaggy Yes. That looks reasonable.

K (ngn/k), 39 bytes
{a@&y=x{+//x*(&/'b)&\:&/b:~x=y}/:a:,/x}

Try it online!
thanks @Adám for this explanation:
{…} function, x is M and y is S
 ,/x flatten M (these are the k candidates)
 a: assign to a
 x{…}/: apply the following function to each while using M as fixed left argument (x):
  x=y Boolean matrix indicating where elements of M equal the current k candidate
  ~ negate that
  b: assign that to b
  &/ AND reduction (finds columns without that k)
  (…)&\: AND that with each of the following:
   &/'b AND reduction of each (finds rows without that k)
  x* multiply M by that
  +// grand sum
 y= list of Booleans indicating where S equals those sums
 & indices of Trues
 a@ use that to index into the elements (the k candidates)

Feel free to correct the explanation.

The dangers of copy-paste explanation…

APL (Dyalog Unicode), 35 33 28 bytesSBCS
-7 thanks to ngn.
Anonymous infix lambda. Takes S as left argument and M as right argument.
{⍵[⍸⍺=(+/∘,⍵×∧/∘.∧∧⌿)¨⍵≠⊂⍵]}

Try it online!
{…} "dfn", ⍺ and ⍵ are left and right arguments (S and M) respectively:
 ⍵[…] index M with the following coordinates:
  ⊂⍵ enclose M to treat it as a single element
  ⍵= compare each element (i.e. k candidate) of M to that entire M
  (…)¨ apply the following tacit function to each:
   ∧⌿ vertical AND reduction (finds columns without that k candidate)
…∘.∧ Cartesian Boolean product with:
    ∧/ horizontal AND reduction (finds rows without that k candidate)
   ⍵× multiply M with that mask
   +/∘, sum the flattened matrix
  ⍺= Boolean indicating where S equals those sums
  ⍸ indices where that's true

{M[⍸⍺={+/,(∧⌿d)/M⌿⍨∧/d←M≠⍵}¨M←⍵]}

@ngn Thanks. I won't use the global, though, as it makes order of evaluation confusing: — How can you index into M when it hasn't been created yet?

passing ⍵ as ⍺ in the inner dfn is equally confusing to me

{⍵[⍸⍺=+/¨(,⍵×∧/∘.∧∧⌿)¨⍵≠⊂⍵]}

@ngn Yeah, I wanted to do something like that. Thanks!

R, 78 73 bytes
function(m,s)m[Map(function(y)sum(m[(w=-which(m==y,T))[,1],w[,2]]),m)==s]

Try it online!
Does not sort or deduplicate the output.
Credit to J.Doe & Giuseppe for -5 bytes.

76 bytes

@J.Doe 73 bytes

Pyth,  27 23 22 21  20 bytes
fqvzss.DRsxLTQ-I#TQs

Test suite!
Does not deduplicate.
How it works?
fqvzss.DRsxLTQ-I#TQs     Full program.
f                  s     Flatten M and keep only those elements T which satisfy:
 qvzss.DRsxLTQ-I#TQ      The filtering function. Breakdown:
              -I#TQ      Discard the rows that contain T. More elaborate explanation:
                # Q         |-> In M, keep only those elements that are...
               I            |-> Invariant under (equal to themselves after...)
              -  T          |-> Removing T.
                         Let's call the result of this expression CR (chopped rows).
          xLTQ           Map over the rows M and retrieve all indices of T.
         s               Collect indices in 1D list (flatten). Call this I.
      .DR                For each row left in CR, remove the elements at indices in I.
    ss                   Sum all the elements of this matrix flattened.
 qvz                     And then finally check whether they equal S.

Haskell, 88 86 84 77 bytes

-2 bytes thanks to BWO
-7 bytes thanks to Tesseract

m!s=[k|k<-m>>=id,s==sum[x|r<-m,all(/=k)r,(i,x)<-zip[0..]r,all((/=k).(!!i))m]]

Verify all testcases.
Explanation
m ! s =                                         -- function !, taking m and s as input
    [k |                                        -- the list of all k's such that
        k <- m >>= id,                          -- * k is an entry of m
        s == sum                                -- * s equals the sum of
            [x |                                --     the list of x's such that
                r <- m,                         --     * r is a row of m
                all (/= k) r,                   --     * r does not contain k
                (i, x) <- zip [0 ..] r,         --     * i is a valid column index; also let x = r[i]
                all ((/= k) . (!! i)) m         --     * none of the rows contain k at index i
            ]
    ]

Should that say “function f”?

@Quintec Indeed it should have, but I changed it to "function !" to save 2 bytes thanks to BWO

Jelly, 20 19 17 15 14 bytes
pZnⱮFȦ€€ḋFẹƓịF

This is a monadic link that takes M as argument and reads S from STDIN.
Try it online!
How it works
pZnⱮFȦ€€ḋFẹƓịF  Main link. Argument: M

 Z              Zip; transpose the rows and columns of M.
p               Take the Cartesian product of M and its transpose, yielding all pairs
                (r, c) of rows and columns of M.
    F           Flatten; yield the elements of M.
  nⱮ            Not equal map; for each element e of M, compare the elements of the
                pairs (r, c) with e.
     Ȧ€€        All each each; for each array of Booleans corresponding to an (r, c)
                pair, test if all of them are true.
         F      Flatten; yield the elements of M.
        ḋ       Take the dot product of each list of resulting Booleans and the
                elements of M.
           Ɠ    Read an integer S from STDIN.
          ẹ     Find all indices of S in the dot products.
             F  Flatten; yield the elements of M.
            ị   Retrieve the elements of the right at the indices from the left.

Mark my words lol :) Nice answer, +1

Python 2, 114 108 bytes
lambda m,s:{a for a in sum(m,[])if s==sum(v for l in m for i,v in enumerate(l)if{a}-set(l)-set(zip(*m)[i]))}

Try it online!

Perl 6, 80 74 bytes
->\m,\s{grep {s==sum m[m.$_;[[Z](m).$_]]}o{*.grep(:k,!*.grep($_))},m[*;*]}

Try it online!
Explanation
->\m,\s{...}  # Anonymous block taking arguments m and s
  grep {...}o{...},m[*;*]   # Filter matrix elements
                            # with combination of two functions
    *.grep(:k,!*.grep($_))  # (1) Whatever code returning matching rows
    s==sum m[               # (2) s equals sum of elements
      m.$_;                 #     in matched rows
      [                     #     (array supporting multiple iterations)
       [Z](m).$_            #     and matched columns (matched rows
                            #     of m transposed with [Z])
      ]
    ]

05AB1E, 21 bytes
²˜ʒQεZ+}øεZ<~}ø_*OO¹Q

Try it online!
Only after I've written this answer have I seen Kevin's. I believe this is substantially different, so I am posting it separately. My intuition says that the optimal byte count is around 18, so I'll have to revisit this and see what else I can do. With the current code, it is impossible to write a test suite but I have verified all test cases myself and the results are correct.
Cropping Algorithm
To better illustrate the technique used, let's grab an example, with the element to crop \$k=5\$:
$$M=\left(\begin{matrix}6&1&\bbox[green,1pt]{\color{white}{5}}\\1&2&8\\9&8&\bbox[green,1pt]{\color{white}{5}}\\6&0&4\end{matrix}\right)$$
It first generates the matrix of equality with \$k\$:
$$\left(\begin{matrix}0&0&1\\0&0&0\\0&0&1\\0&0&0\end{matrix}\right)$$
Then, it goes through \$M\$ and for each row \$R\$, it adds \$\max(R)\$ to each element in \$R\$, highlighting the necessary rows while still preserving the uniqueness of the horizontal positions of the searched element:
$$\left(\begin{matrix}\color{green}{1}&\color{green}{1}&\bbox[green,1pt]{\color{white}{2}}\\0&0&0\\\color{green}{1}&\color{green}{1}&\bbox[green,1pt]{\color{white}{2}}\\0&0&0\end{matrix}\right)$$
Then, it goes through the transpose of \$M\$ and for each column \$C\$, it performs the operation \$(\max(C)-1)\space ||\space c\space\forall\space c\in C\:\$ (where \$||\$ is 05AB1E's bitwise OR – addition should work too, so replace ~ with + if you want to test that too), which results in:
$$\left(\begin{matrix}\color{green}{1}&\color{green}{1}&\bbox[green,1pt]{\color{white}{3}}\\0&0&\color{green}{1}\\\color{green}{1}&\color{green}{1}&\bbox[green,1pt]{\color{white}{3}}\\0&0&\color{green}{1}\end{matrix}\right)$$
Finally, it maps \$0\$ to \$1\$ and all other integers to \$0\$ and performs element-wise multiplication with \$M\$:
$$\left(\begin{matrix}\color{green}{0}&\color{green}{0}&\color{green}{0}\\1&1&\color{green}{0}\\\color{green}{0}&\color{green}{0}&\color{green}{0}\\1&1&\color{green}{0}\end{matrix}\right)\:\longrightarrow\:\left(\begin{matrix}\color{green}{0}&\color{green}{0}&\color{green}{0}\\1&2&\color{green}{0}\\\color{green}{0}&\color{green}{0}&\color{green}{0}\\6&0&\color{green}{0}\end{matrix}\right)$$
After which the sum of the resulting matrix is computed.

Nice answer! I knew mine would be golfable for sure. I was already happy enough to have it working, including the annoying case of [[1,1,0,1],[2,0,0,2],[2,0,1,0]] which screwed me over for number 1 (which removes every column..) I indeed had slightly below 20 in my head as well as possibility. Too bad there are barely any builtins for matrices, despite the added product ones recently. As for the 1|2 (1 2~ in 05AB1E synthax) resulting in 3, this is because the logical OR acts like a binary OR when numbers other than 0/1 are involved (I think/assume).

@KevinCruijssen Oh you are right! Then, the docs should write bitwise OR, not logical OR. I am going to have to correct that soon. Anyway, bitwise OR should work as well I think. It can be replaced by + anyway I guess, so I hope there will be no issues with it :)

05AB1E (legacy), 27 26 bytes
˜ʒ©¹ε®å_}¹ζʒ®å_}ζ‚ζ€€OPOIQ

Does not sort nor uniquify the result.
Only works in the legacy (for now), because sum-each seems to be doing some odd things when part of the inner lists are integers and other are lists..
Try it online or verify all test cases.
Explanation:
˜              # Flatten the (implicit) matrix-input
               #  i.e. [[6,1,5],[1,2,8],[9,8,5],[6,0,4]] → [6,1,5,1,2,8,9,8,5,6,0,4]
 ʒ             # Filter this list by:
  ©            #  Store the current value in a register-variable
   ¹           #  Take the matrix-input
    ε   }      #  Map it to:
     ®å_       #   0 if the current number is in this row, 1 if not
               #    i.e. [[6,1,5],[1,2,8],[9,8,5],[6,0,4]] and 6 → [0,1,1,0]
   ¹           #  Take the matrix-input again
    ζ          #  Swap its rows and columns
               #   i.e. [[6,1,5],[1,2,8],[9,8,5],[6,0,4]] → [[6,1,9,6],[1,2,8,0],[5,8,5,4]]
     ʒ   }     #  Filter it by:
      ®å_      #   Only keep the inner lists that does not contain the current number
               #    i.e. [[6,1,9,6],[1,2,8,0],[5,8,5,4]] and 6 → [[1,2,8,0],[5,8,5,4]]
               #    i.e. [[1,2,2],[1,0,0],[0,0,1],[1,2,0]] and 1 → []
          ζ    #  After filtering, swap it's rows and columns back again
               #   i.e. [[1,2,8,0],[5,8,5,4]] → [[1,5],[2,8],[8,5],[0,4]]
   ‚ζ          #  Pair both lists together and zip them
               #   i.e. [0,1,1,0] and [[1,5],[2,8],[8,5],[0,4]]
               #    → [[0,[1,5]],[1,[2,8]],[1,[8,5]],[0,[0,4]]]
               #   i.e. [0,1,0] and [] → [[0,' '],[1,' '],[0,' ']]
     €         #  Map each inner list / value to:
      €O       #   Sum each
               #    i.e. [[0,[1,5]],[1,[2,8]],[1,[8,5]],[0,[0,4]]]
               #     → [[0,6],[1,10],[1,13],[0,4]]
               #    i.e. [[0,' '],[1,' '],[0,' ']]
               #     → [[0,0],[1,0],[0,0]]
               #  (NOTE: For most test cases just `O` instead of `€€O` would be enough,
               #   but not if we removed ALL zipped inner lists for a number, like the
               #   second example above with input [[1,1,0,1],[2,0,0,2],[2,0,1,0]] and 1)
        P      #  Now take the product of each inner list
               #   i.e. [[0,6],[1,10],[1,13],[0,4]] → [0,10,13,0]
         O     #  Then take the sum of those
               #   i.e. [0,10,13,0] → 23
          IQ   #  And only keep those that are equal to the number-input
               #   i.e. 23 and 9 → 0 (falsey), so it's removed from the flattened input

Jelly, 22 bytes
=+Ṁ$€Z$⁺’¬×⁸FS
F³ç=⁹ƲƇ

Try it online!
-6 bytes using the general approach from Mr. Xcoder's 05AB1E answer.

Charcoal, 33 bytes
ＦθＦι⊞υκＩΦυ⁼ηΣＥθ∧¬№λιΣＥλ∧¬№Ｅθ§πξιν

Try it online! Link is to verbose version of code and includes deduplication. Explanation:
ＦθＦι⊞υκ

Flatten the first input array q into the predefined list u.
  υ                          Flattened array
 Φ                           Filter elements
       θ                     Input array
      Ｅ                      Map over rows
            ι                Current element
           λ                 Current row
          №                  Count matching elements
         ¬                   Logical Not
        ∧                    Logical And
               λ             Current row
              Ｅ              Map over columns
                    θ        Input array
                   Ｅ         Map over rows
                      π      Inner row
                       ξ     Column index
                     §       Inner element
                        ι    Current element
                  №          Count matching elements
                 ¬           Logical Not
                ∧            Logical And
                         ν   Current element
             Σ               Sum
     Σ                       Sum
    η                        Second input
   ⁼                         Equals
Ｉ                            Cast to string
                             Implicitly print each result on its own line

For each element of the list, sum the array, but if the row contains the element then use 0 instead of its sum, and when summing rows that don't contain the element, if the column contains the element then use 0 instead of the column's value. This is very slightly golfier than filtering the elements out as Charcoal can't sum an empty list.

MATLAB - 80 bytes
(Corrected and) Compacted:
function f(M,s);for k=M(:)';if sum(sum(M(~sum(M==k,2),~sum(M==k))))==s;k,end;end

And in a fully developped version:
function getthesum(M,s)

for k=M(:)'                         % For each element of M
    x = M==k ;                      % Index elements equal to "k"
    N = M( ~sum(x,2) , ~sum(x) ) ;  % New matrix with only the appropriate rows/columns
    if sum(sum(N))==s               % sum rows and columns and compare to "s"
        k                           % display "k" in console if "k" is valid
    end
end

Thanks to the comments to highlight my initial mistake. Note that this version does not de-duplicate the output.
It is possible to deduplicate the output with 5 more bytes:
% This will only cycle through the unique elements of 'M' (85 bytes):

function f(M,s);for k=unique(M)';if sum(sum(M(~sum(M==k,2),~sum(M==k))))==s;k,end;end

k could be any element of the matrix.

@Dennis, oops that's right ... My bad, i'll correct it later today. Thanks for pointing it out.

@Arnauld. Sorry I was on holidays, that it fixed now.

Clean, 92 bytes
import StdEnv
$m s=[c\\r<-m,c<-r|sum[b\\a<-m|all((<>)c)a,b<-a&x<-[0..]|all(\u=u!!x<>c)m]==s]

Try it online!
Explained:
$ m s                       // the function $ of `m` and `s`
 = [                        // is equal to
  c                         // the value `c`
  \\ r <- m                 // for every row `r` in `m`
  , c <- r                  // for every value `c` in `r`
  | sum [                   // where the sum of
   b                        // the value `b`
   \\ a <- m                // for every row `a` in `m`
   | all ((<>)c) a          // where `c` isn't in `a`
   , b <- a                 // for every value `b` in `a`
   & x <- [0..]             // with every column index `x` from zero
   | all (\u = u!!x <> c) m // where `c` isn't in column `x`
  ] == s                    // equals `s`
 ]


text:
What did we forget?
Your task is to write a non-empty computer program comprised of some sequence of bytes.  If we choose a particular byte in the program and remove all instances of it from the program, the modified program should output the removed byte.
For example if our program were
aabacba

Then bcb would output a, aaaca would need to output b and aababa would output c.
It does not matter what the unmodified program does.
Answers will be scored in bytes with the goal being to minimize the number of bytes.

Since this challenge isn't tagged quine, may we read our own source code?

@Dennis Sure. Be my guest

If all the bytes in our program  represent digits, may we output via exit code?

I think this would be better as a code challenge where you have to maximise the number of discrete characters used.

@tsh that’d be pretty interesting!

Should've specified more than 1 byte instead of non-empty :P. Or what Notts90 said.

@Notts90 Probably. The radiation hardening already makes the non-trivial answers quite hard.

@MagicOctopusUrn The votes agree with you... this is a case of code-golf with the 548 byte answer getting the lion's share of upvotes!

@MagicOctopusUrn More than 1 byte would mean that all the one byte answers would just be two bytes, e.g. 11 for retina.  Unless you mean more than one distinct byte.  Which would probably have improved the challenge.

Is output with a trailing newline acceptable? (If so, would the output when the newline character is removed have to be two newlines?)

There is no clear meta consensus on this, and in any case whether two newlines would be required if a newline was removed is a challenge-specific question (as it essentially amounts to "is it okay to only sometimes add a trailing newline).

@Doorknob Ok you can add an extra new line.

Would the output when a newline is removed have to be two newlines, then, or would a single newline be acceptable (when all other outputs have trailing newlines)?

@Doorknob It should probably be 2.

zsh, 603 594 566 561 548 440 415 399 378 370 bytes
ec
ho \\n;ca t<<<$'\x20';exi t
d$c -e8BC6P
d0c -eKp
$'\172\163\150' $'\055\143' $'\146\157\162 v \151\156 \173\043\056\056\134\175\175\073\173 \146\147\162\145\160 \055\161 $\166 '$0$'\174\174\074\074\074$\166\073\175'
$'\145v\141\154' $':\073\072\046\046\145\170\151\164';#%&()*+,/9=>?@ADEFGHIJLMNOQRSTUVWXYZ[]^_`jklmsuwy
0# $#;for b in {$..z};{ fgrep -q $b $0||<<<$b;}

Depends on coreutils + dc.
Try it online!
That was... a journey.
This answer has three parts. The first 4 lines handle certain special cases to simplify the code that follows. The next 2 lines and the last line both accomplish essentially the same thing, but exactly one is run with any given character removal. They are written with mostly complementary character sets, so that removing any character breaks only one at most, allowing the other to continue to function.
Looking at the first part, we first handle

newline removal with ec\nho \\n
space removal with ca t<<<$'\x20' (followed by exi t to avoid running later code, which would result in extraneous output)
$ removal with d$c -e8BC6P (8BC6 = 9226 is 36*256 + 10, and 36 and 10 are the byte values of the $ and newline characters respectively; we use hex digits in decimal to avoid having to include them in the large comment in line 6)
0 removal with d0c -eKp (K gets the decimal precision, which is 0 by default)

In the next part, the only characters used (aside from the garbage at the end of the second line) are $'\01234567v;, space, and newline. Of these, four have been accounted for, so the remainder ('\1234567v) cannot occur in the last line. Expanding the octal escapes ($'\123' represents the ASCII character with value 1238), we get:
zsh -c 'for v in {#..\}};{ fgrep -q $v '$0'||<<<$v;}'
eval ':;:&&exit'

The first line loops through all characters used in the program and searches for each one in its own source code ($0 is the filename of the script being run), printing any character that is not found.
The second line looks a little strange, and appears to do the same thing as exit with a bunch of nops. However, encoding exit as octal directly results in $'\145\170\151\164', which does not contain 2 or 3. We actually need to make this less resilient to removals. This is because if any of '\014567v are removed, breaking the first line, the second line also breaks, allowing the remainder of the code to execute. However, we need it to also break if 2 or 3 are removed so that lines 3 and 4 can run. This is accomplished by shoehorning in : and ;, which have a 2 and 3 in their octal representation respectively.
The junk at the end of line 2 is simply there to ensure every printable ASCII character appears at least once, as the way the checking is done by looping through each one requires this.
If exit was not called in the first section (i.e. it was mangled by the removal of one of '\01234567v), we move on to the second, in which we must accomplish the same thing without using any of these characters. The last line is similar to the decoded first line, except that we can contract the range of the loop to save a few bytes, because we already know that all characters except for '\01234567v have been covered. It also has 0# $# before it, which comments it out and prevents it from producing extraneous output if 0 or $ were removed.

Wow, very impressive considering the amount of distinct characters involved! Definitely looking forward seeing that explanation.

@KevinCruijssen here you go :)

@Doorknob if this doesn't win you 548 internets, I don't know what does. Honestly, the 603 byte version is just as impressive hah!

The only interesting answer so far.

Retina, 1 byte
1

Try it online!
When all instances of the single byte (1) are removed, the output is 1. Simple enough.

I was browsing TIO to find something like this - you beat me to it. Btw this is a polyglot, works with Snails

IMO, this answer should be upgraded to a polyglot answer as the first one (possibly with a forever-incomplete list of languages), and the other two downvoted to oblivion. Oh, and this also works in C.

@Rogem I'm not sure what you mean by "this works in C." do you have a C compiler which outputs 1 for the empty program? Regardless, I think the answers in question utilize different approaches and behaviours. IMO a polyglot answer is only warranted if the approach remains the same. (Objectively, this isn't a polyglot as the actual code is different, for the answers below.) Feel free to vote how you want, but a valid answer is a valid answer. I will keep my answer as it is, I don't wish to house a collection of answers on it.

Lenguage, 216173027061157310 bytes
216173027061157310 = (144115617572598740 + 144115241762960340 + 144115194786755540) / 2. There are 216173027061157310 - 144115617572598740 $s, 216173027061157310 - 144115241762960340 #s and 216173027061157310 - 144115194786755540 spaces.
The 144115617572598740 #s and spaces encode the following BF program:
++++++[>++++++<-]>.

Try it online!
The 144115241762960340 $s and spaces encode the following BF program:
+++++++[>+++++<-]>.

Try it online!
The 144115194786755540 $s and #s encode the following BF program:
++++++++[>++++<-]>.

Try it online!
Edit: Saved 72057832274401770 bytes thanks to @Nitrodon.

Why not use U and byte 127? Try it online! Or even just the nul byte and soh?

@JoKing I didn't know that U was the shortest printable ASCII byte that could be output. I didn't want to use unprintable bytes.

Even without taking advantage of wrapping cells or unprintable characters, you can get this down to 216173027061157310 bytes by including the space character as a third distinct byte.

I can't help but upvote because of "Edit: Saved 72057832274401770 bytes..."

Jelly, 1 byte
0

Completely different from the Retina answer. whistles
Try it online!

Polyglot with M and Enlist.

Polyglot*, 1 byte (awaiting confirmation)
0

Try it online! (using Triangularity)
*: This works in a (rather wide) variety of languages (except for esolangs like 4, ><> and the like and some other exceptions). Identical to the Jelly answer in source code, but the method of I/O is different – Output is via exit code. When one removes 0 from the source code, they're left with an empty program, which often doesn't error and yields exit code 0 in the majority of languages.

sed, 1 byte

Try it online!
Completely different from the Retina answer, or the Jelly answer.

I don't see any code. Wouldn't that make it a 0 byte answer? How does this work?

@Mast There is a newline..... you will have difficulty reading programs written in Whitespace if you keep thinking like that.

Unary (non-competitive), 96 bytes
00000000: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000010: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000020: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000030: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000040: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000050: 0000 0000 0101 0101 0101 0101 0101 0101  ................

Here is xxd dump.
A wider definition of Unary language allows any characters in its source code. But I havn't find a compiler or interpreter which would work for this. So I marked this answer as non-competitive. If you can find one which posted before this question asked, I will link to it.

This is the smallest Unary program I've ever seen.

Gol><>, 143 bytes
<\Hs+:+:PPPs\
\sM:+:+H
HP+:+:PPPs++\
HsssssssM+++\
;HssssMMMMM++\
;o+:+:PPs++\
+:+:P+:PPP\H+P:P+:
ssssMMMMMM\H
sHsssMMMMM+\
Hsssss+++\
HMMMMMMs

Try it online!
This contains the characters <\Hs+:PM;o and newline

< Try it online!

\ Try it online!

H Try it online!

s Try it online!

+ Try it online!

: Try it online!

P Try it online!

M Try it online!

; Try it online!

o Try it online!

Newline Try it online!

I wanted to solve this in a 2D language, but most 2D languages are ruled out from this challenge. Gol><> works because of the large number of operations including operations with overlapping functionality, this ensures that we can write a meaningful program with any 1 character banned.
We use the standard radiation-hardening technique for 2D languages here.  The removal of characters causes the length of a line to change which creates a new alignment and sends the pointer down a new path untouched by the radiation.
Each character gets its own line of the program and which line is run is triggered by the removal.  We could possibly choose a smaller character set to work with <\Ho;P1+ and newline should work, however the lines would be very long making this overall more costly.