text:
Reconstruct a 3d arrangement of cubes from two of its projections
Setup
Take the following 4x4x4 cube along with a 2D view of 3 of its faces, with a common 1x1x1 cube highlighted:

The arrows represent the points of view that generated the V1, V2 and V3 faces drawn underneath the big cube.
Given an arrangement of some 1x1x1 cubes inside the main cube we can try and identify it with only three projections. For example, the arrangement below:

could be represented as follows:
V1
X...
....
....
XXXX

V2
X...
X...
X...
X..X

V3
X...
X...
X...
XXXX

However, if we consider only projections on V1 and V2, most of the time we can't identify uniquely the arrangement being considered.(there are arrangements that can't be uniquely identified, even with the 6 projections)
Task
Given projections on V1 and V2, output the minimum and maximum number of 1x1x1 cubes that an arrangement could have and still produce the projections V1 and V2.
I'll walk you through 2 examples:
Explained example 1
V1
XXXX
....
....
....

V2
X...
X...
X...
X...

These two projections signal some directions along which there must be cubes:

and the output would be 4, 16; This is the case because both V3 below represent valid projections on V3:
V3a
X...
.X..
..X.
...X

This is a "diagonal" pattern of cubes in the back plane, when viewed from V3; ...
V3b
XXXX
XXXX
XXXX
XXXX

and this is a full face in the back plane.
Explained example 2
V1
XXXX
XXXX
XXXX
XXXX

V2
XXXX
....
....
....

These projections represent the top face of the main cube, so in this case we managed to identify the arrangement uniquely. The output in this case would be 16, 16 (or 16, see output rules below).
Input
Your code takes the projections on V1 and V2 as input. There are a variety of reasonable ways for you to take this input. I suggest the following to represent each projection:

An array of length 4 with strings of length 4, two different characters to encode "empty" or "filled", like ["X...", ".X..", "..X.", "...X"] for the V3a above.
An array/string of length 16, representing the 16 squares of the projection, like "X....X....X....X" for V3a above.
An integer where its base 2 expansion encodes the string above; 1 must represent the X above, so V3a above would be 33825 = b1000010000100001.

For any of the alternatives above, or for any other valid alternative we later decide that is helpful for you guys, you can take any face in any orientation you see fit, as long as it is consistent across test cases.
Output
The two non-negative integers representing the minimum and maximum possible number of 1x1x1 cubes in an arrangement that projects onto V1 and V2 like the input specifies. If the minimum and maximum are the same, you can print only one of them, if that helps you in any way.
Test cases
(I didn't really know how to format these... if needed, I can reformat them! Please let me know.)
XXXX
....
....
....,
X...
X...
X...
X... -> 4, 16

XXXX
XXXX
XXXX
XXXX,
XXXX
....
....
.... -> 16, 16

XXXX
XXXX
XXXX
XXXX,
XXXX
....
..X.
.... -> 16, 20

X..X
.XX.
.XX.
X..X,
X.XX
.X..
..X.
XX.X -> 8, 16

XXXX
XXXX
XXXX
XXXX,
XXXX
XXXX
XXXX
XXXX -> 16, 64

X...
....
....
XXXX,
X...
X...
X...
X..X -> 8, 8

X..X
....
....
XXXX,
X...
X...
X...
X..X -> 8, 12

This is code-golf so shortest submission in bytes, wins! If you liked this challenge, consider upvoting it! If you dislike this challenge, please give me your feedback. Happy golfing!

brute-forcing is gonna take a while...

Can I take V1 rotated once, so that V1 and V2 are vertically aligned?

Can V1 and V2 be in different formats?

@Bubbler  can take any face in any orientation you see fit, as long as it is consistent across test cases

@ValueInk that feels weird, why do you want that?

@RGS I had this wild brute force idea where each cube was one bit, so V1 and V2 started off as bit arrays, and the way things were set up it would save bytes for V1 to be represented on a by-row basis where each row was a 4-bit number instead of individual bits. It doesn't matter anymore though, it would save even more bytes if I threw my solution out the window and just ported Surculose's Python solution to Ruby instead.

@ValueInk I also had to throw my brute force solution out the window.

APL (Dyalog Unicode), 11 bytes
+.(⌈,×)/+⌿¨

Try it online!
Takes V1 and V2 as two binary matrices inside a nested vector, and V1 is rotated so that it vertically lines up with V2. Returns doubly nested vector of (min, max).
How it works
The first column of V1 and the first column of V2 decide the first vertical layer of 4x4 cells. If n cells are shaded in V1's column and m cells in V2's, the minimum number of shaded cells in the corresponding 4x4 layer is max(m,n), and the maximum is m * n.
min          |  max
  | 1 0 1 0  |    | 1 0 1 0
-----------  |  -----------
1 | 1 0 0 0  |  1 | 1 0 1 0
1 | 1 0 0 0  |  1 | 1 0 1 0
0 | 0 0 0 0  |  0 | 0 0 0 0
1 | 0 0 1 0  |  1 | 1 0 1 0

Therefore, it suffices to count ones in each column, and evaluate sums of the pairwise max (for minimum) and pairwise product (for maximum) of the column sums.
+.(⌈,×)/+⌿¨
        +⌿¨  ⍝ In each matrix, evaluate column sums
       /     ⍝ Over the two vectors,
+. ⌈         ⍝ Evaluate the sum of pairwise max
    ,        ⍝ and
+.   ×       ⍝ the sum of pairwise product

Really lovely answer.

Python 3, 74 71 bytes
-3 bytes thanks to @Bubbler!
lambda V:(sum(f(*map(sum,p))for p in zip(*V))for f in[max,int.__mul__])

Try it online!
Input: a list of faces [V1,V2], each face is a 4x4 list of binary digit. The orientation of each face is as follow (V2 is rotated 90 degree clock-wise compare to the challenge's default orientation).

Output: A tuple of 2 integers, representing the min and max number of blocks.
Approach
Consider each of the 4 slices of the cube:

We can see that for each slice, the min and max number of block in that slice is respectively the max and the product of the top and left strips.
Code explanation:
lambda V:(sum(f(*map(sum,p))for p in zip(*V))for f in[max,int.__mul__])

for f in[max,int.__mul__] assigns f first to the function max, then to the integer multiply function.
p in zip(*V) pairs each corresponding strips (aka rows) of the 2 faces together.
map(sum,p) applies the sum function to each row in the pair. The result is effectively (top, left).
f(*map(...)) computes either max(top,left) or top*left.
sum(f(...)) sums over all slices.

Valid 71.

@Bubbler thanks! I also came up with the same thing. Writing my explanation now, will update in a bit.

@Bubbler Was mistaking the input for the output :-/

Also 71

Another 71

what did you use to create the images?

@Jonah MS Paint :)

Jelly, 7 bytes
§µ»/,P§

A monadic Link accepting a list of the two projections each being a list of lists of 1s and 0s, [V1, V2], with V2 rotated a quarter turn clockwise which yields a list of two integers, [min, max]
Try it online!
How?
The same method as Bubbler & Surculose Sputum came up with.
§µ»/,P§ - Link: list of two lists of lists of 1s and 0s
§       - sums
 µ      - start a new monadic chain, call that v
   /    - reduce (v) by:
  »     -   maximum (vectorises)
     P  - product of (v) (vectorises)
    ,   - pair
      § - sums

Charcoal, 61 58 22 bytes
≔Ｅ⁴ＥθΣ§λιθＩ⟦ΣＥθ⌈ιΣＥθΠι

Try it online! Takes input as a list of lists in a different orientation to the examples. Uses @Bubbler's formula. Explanation:
≔Ｅ⁴ＥθΣ§λιθ

Transpose the input while taking the count of the number of cubes in each row.
Ｉ⟦ΣＥθ⌈ιΣＥθΠι

Calculate the minimum and maximum cubes for each row, and then take the totals for all four rows.

This one contains so much Greek it's almost readable.


text:
Hello ASCII World!
Construct a full program which outputs Hello, World!. The score of your submission will be equal to the sum of all of the ASCII values of the distinct characters. The lowest score wins!
Rules

It must be a full program which takes no input
It must only print to STDOUT, nothing else
It must be strictly less than 1000 bytes long
It may only include printable ASCII (meaning no \n allowed)
The objective is to find the lowest score for every language, so no answer will be marked "accepted"

Example
Here is an example submission in Python, which has a score of 1279:
print"Hello, World!"

Finally, here is a TIO link to score your submission.

This answer shows how to write any Python program using only exc="% (which would have a score of 452), but it would be insanely long without newline.

On further thought, the above scheme is impossible without newline :(

@SurculoseSputum This one uses 9 chars exc%'(1+), no newline. CJam can do it in just 3: ')~.

Would it then be preferrable to include newlines, or maybe add a penalty for solutions which are too long?

And if you won't change the text "Hello, World!", Stuck will win as always.

There. I've added a 1000 byte limit, so the submissions don't get out of hand.

(Sort of) Related.

C (gcc) -zexecstack -Wl,-e$ -nostartfiles on Linux x86-64, 876 914 bytes, score 798 293
$=1111+1111+1111+111+111-11-11-11-11+1+1+1;$$=1111111111+111111111-11111111+1111111+1111111-111111+1111+1111+111+111+111+111+111-11-11-11-11+1+1+1+1+1;$$$=111111+111111-11111-1111+111+111+111-11-1-1-1-1-1;$$$$=111111111+111111111+11111111+11111111+11111111+1111111+1111111+111111-1111-1111-1111-1111-111-111-111+11+11+11+11+1+1+1+1+1;$$$$$=1111111111+1111111111-111111111-111111111-111111111-111111111+11111111+11111111+11111111+11111111-1111111-1111111-1111111-111111-111111-111111+11111+11111-1111+111+111+11+1;$$$$$$=111111111+111111111+111111111+111111111+111111111-11111111-1111111-1111111-1111111-1111111-111111-111111+1111+1111+1111+1111+1111-111-111-111+11+11-1-1;$$$$$$$=1111111111+1111111111-111111111-111111111-111111111-111111111+11111111+11111111+11111111+11111111-1111111-1111111-111111-111111-111111-111111-111111-1111-1111-1111-1111-1111+11+11+11+11+1;$$$$$$$$=11111-1111-1111-111-111-111-11+1+1+1;

Try it online!
Charset: A[]={+,-1}; 1+-$=;
Same method as the previous answer, with even more hacking to supply a custom entry point named $ (which has the smallest ASCII value among a-zA-Z_$). Credit to this SO answer for identifying the flags and assembly setup to make this work. Also got a hint from ceilingcat's awesome linker hack to remove []{} from the code.
Assembly: (NASM syntax)
bits 64
global _start
_start:
  mov edx, 13
  pop rax
  push rax
  lea rsi, [rel s]
  pop rdi
  syscall
s: db "Hello, World!"

Uses the argc=1 set up on the stack to load the value 1 to rax and rdi. The instructions are slightly mixed up in order to get the minimal code length in C.
Here is the Python script that generates the "ones decomposition" from the xxd -i output (C include-style hex output) of the compiled binary.

C (gcc) -zexecstack on Linux x86-64, 891 bytes, score 1154
main[]={1111+1111+1111+111+111-11-11-11-11+1+1+1,1111111111-111111111-111111111+11111111-1111111-111111-111111-111111-111111+11111-1111-1111-1111-1111+111+111+111+11,1+1+1+1,111111111-11111111-11111111-1111111-1111111-1111111-1111111+111111+111111+111111+111111+11111+11111+11111+11111-111-111-111-111-111-11-11-11,1111111111+1111111111-111111111-111111111-111111111-111111111+11111111+11111111+11111111+11111111-1111111-1111111-1111111+111111+11111+11111+11111+11111-1111-111-111+11+11+11,1111111111+111111111+111111111+111111111+11111111+11111111-1111111-1111111-1111111-1111111-111111-111111-111111-111111-11111-11111-11111-11111-11111+1111+1111+1111+1111-111-111-111-11-1-1-1-1,1111111111+111111111+111111111+111111111+111111111+111111111+11111111+11111111-1111111-1111111-1111111-1111111+111111+111111+111111+11111+11111+11111+11111+11111-1111-1111-1111-1111-111+11-1-1-1-1-1,11+11+11};

Try it online!
Uses ceilingcat's minimal Turing-complete charset main[]={1+,};, plus - to meet the code length limit.
Assembly: (NASM syntax)
bits 64
global _start
_start:
  mov edx, 13
  lea rsi, [rel s]
  mov eax, edi
  syscall
s: db "Hello, World!"

Essentially calls write syscall once, and goes into arbitrary instructions formed by the string literal, causing segfault.

This is a brilliant solution (I’ve upvoted it). But I think the language should be "C (gcc)/x86".  It won’t work using gcc on a non-x86 machine.

In fact, I just tried it on two x86 machines (one Linux and one OS X), and it failed to print "Hello, World!" on both.  I don't know what the difference is between these and TIO, where it worked.

One more comment: This program writes an error message to stderr (when it crashes), which I understood wasn't allowed in OP's specs ("It must only print to STDOUT, nothing else"). I could reduce my dc score, for instance, if spurious output to stderr was allowed, and that's probably true of some of the other solutions as well.

@MitchellSpector This code is supposed to work in x86-64, with executable stack (-zexecstack flag in the compiler/linker). And as pointed out in the linked answer, you might need const in some environments. The error messages are printed by the OS, not the program.

Thanks -- I missed that flag because it wasn't included with the language name in the answer heading, but it's clearly needed.  That got it to work correctly on my Linux system.  But I still can't get it to work under OS X, where I believe the equivalent compiler option is -Wl,-allow_stack_execute -- but even with that option, it doesn't print "Hello, World!".  I tried it with and without the const keyword before main.  If you know how to get this to work under OS X, I'd be interested.

I should also correct my earlier statement about output to stderr.  Not only is the error message printed by the OS, not by the program, as you said, but it's actually printed to stdout, not stderr (which surprised me when I checked).

@MitchellSpector I found that the syscall numbers are different on OS X (the write syscall number seems to be 0x2000004). So you'll need mov eax, 0x2000004 instead of mov eax, edi in the assembly, which will entirely change the code.

Oh, that makes sense -- thank you. I've never done much x86 programming (lots of 6502 programming back in the day, and then some 68020, but only occasional assembly-language coding since then).

I think you can eliminate braces by just declaring your array and then assigning each element individually?

You could also use a digraph, perhaps.

score 248

CJam, 652 bytes, score 120
'))))))))))))))))))))))))))))))))')))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))'))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))'))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))')))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))'))))''(((((((')))))))))))))))))))))))))))))))))))))))))))))))')))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))'))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))'))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))'))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))''((((((

Try it online!
Uses ')(.

HQ9+, 1 byte, score 72
H

There is no TIO implementation for HQ9+.

Malbolge, 71 bytes, 3963 points
(=<`#9]=}5YXy1Uvv-Q+q)Mn&Jk#j!EC$dc.?}_<)L'8%oXW2qj|Q@yx+iba'Hd]\E!YX|z

Try it online!
Uses the following unique characters
!#$%&'()+-.12589<=?@CEHJLMQUWXY\]_`abcdijknoqvxyz|}

Stuck, 0 bytes, score 0
An empty program prints "Hello, World!"
Just as suggested in the comments, Stuck wins!

Can we please stop the low-effort stuff? 1+ though.

Wolfram Language (Mathematica), 321 bytes, score 399
charset: \013456
\043\1333311\05313311\0531133\135\133\043\13311\0534011\0534031\135\133\043\1331343\05311354\135\13331\05341\054101\0544\053104\0544\053104\054111\05444\0541\05331\05443\05344\054111\054114\0544\053104\054100\05433\135\135\135\046\1330\133\1330\0540\135\135\133\116\141\155\145\163\133\135\133\133\043\135\135\135\046\135

Try it online!
I feel it's best to try to explain this one. First, Mathematica allows character inputs with octal triplets (From this point on, I'll be using my local copy), after decoding, looks like so
#[1000+31111][#[3304+11135][#[10000+13003][31+41,101,4+104,4+104,111,44,1+31,43+44,111,114,4+104,100,33]]]&[0[[0,0]][Names[][[#]]]&]

All of the addition is just to avoid getting a 2, 7, 8, or 9, which in octal have 2s and 7s, which are trivially avoidable, all the other characters are the minimum needed to get Names[]. When the actual functions are shown,
Print[FromCharacterCode[List[72,101,108,108,111,44,32,87,111,114,108,100,33]]]

Where all the functions are hidden inside a Names[][[1234]] so that they can all be numerically decided, but Names[], at minimum, needs \13456 to derive everything else, the 0 is needed to turn Names's string output into Functions, as 0[[0,0]] returns Symbol.
I know that after making this whole thing it can be golfed to do without 0, as the only time it comes up is in addition, inside the octal for the + symbol, and getting the symbol header, meaning that if 0 can be derived elsewhere then in the charset 0 can be switched to +, lowering the score by 5. All it would need is to not use commas inside list. The only function that I recall that can do this is the Append family, but calling Append instead of each comma makes the program over 2k in size.
In case you want to see how it was generated, I will put most of my code here

Knight, 460 383 442 bytes, score 268 236 226
-32 score thanks to @Adam by utilizing A1
-10 score thanks to @emanresu A and @UnrelatedString by using E to EVAL O"Hello, World" instead of using O directly
E+++++++++++++++A+11+11+11+11+11+11+11+1+1A1A+11+11+11+1A1A+11+11+11+11+11+11+1+1+1+1+1+1A1A+11+11+11+11+11+11+11+11+11+1+1A1A+11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1A1A+11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1A1A+111A1A+11+11+11+11A1A+11+11+1+1+1+1+1+1+1+1+1+1A1A+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1+1A1A+111A1A+111+1+1+1A1A+11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1A1A+11+11+11+11+11+11+11+11+11+1A1A+11+11+11A1A+11+11+11+1A1

Characters used: E+A1
Try It Online!
(Code used to generate this Knight code: Try It Online!)

You can actually do this without spaces, e.g. https://controlc.com/d04bd5eb. You can probably modify your code to get rid of spaces as well.

Here's the equivalent for your code: https://controlc.com/8ce83f01

@Adam Wow doing A1 is actually super smart, editing my answer now.

If you have the willpower, E has a lower charcode than O.

@emanresuA Not that hard with the existing code :P

@UnrelatedString Bro that's actually big brain, wowow

C (gcc), 344 \$\cdots\$ 254 242 bytes, score 1624 1575
Lowered score by 49 thanks to Arnauld!!!
Saved 12 bytes thanks to ceilingcat!!!
h;t;u;i;a;main(c){u+=u=i+=i=a=c+c+c;t=u+u+u;putchar(putchar(t+t)+u+u+a+c+c);putchar(putchar(putchar(h=t+t+t))+a);putchar(t+i+c+c);putchar(u+u+i+c+c);putchar(t+t+u+a);putchar(h+a);putchar(h+i);putchar(h);putchar(t+t+u+u+a+c);putchar(u+u+i+a);}

Try it online!
Uses characters: ()+;=achimnprtu{}

You can get rid of 1 by retrieving it from argc, leading to 1575 points.

@Arnauld Very clever - thanks! :-)

@Arnauld Why not? Thanks! :-)

@Arnauld Knocked down to a quarter K - thanks! :-)

Yeah, that's a nice round figure. And that's why I didn't submit the 254-byte version. ;)

@Arnauld Yeah, let's stick with 256. Sweet number! :D

@Arnauld Sorry, can't help  myself. Now we're down to 8-bit numbers - thanks! :D

@ceilingcat Wow, very nice! Shame the score is independent of the byte count. Thanks anyway! :-)

score 1445

dc, 106 652 192 428 bytes, score 332 272 272 204
11 11+11+11+11+11+1+1+1+1+1+1+P11 11+11+11+11+11+11+11+11+1+1+P11 11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1+P11 11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1+P11 11+11+11+11+11+11+11+11+11+1+P11 11+11+11+P11 11+1+1+1+1+1+1+1+1+1+1+P11 11+11+11+11+11+11+1+1+1+1+1+1+1+1+1+1+P11 11+11+11+11+11+11+11+11+11+1+P11 11+11+11+11+11+11+11+11+11+1+1+1+1+P11 11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1+P11 11+11+11+11+11+11+11+11+1+P11 11+11+P

Try it online!
4 characters used: +1P and the space character.

You need to sum the codepoints of all characters you use in your program.

@a'_'  You're right - I misread the scoring in the challenge. It's fixed.

You may be interested in the bounty to https://codegolf.stackexchange.com/q/11336 for the dc solution with the lowest number of unique characters

@user41805 Thanks, I hadn’t seen the bounty. (I haven’t had time to do any code golf for a while.)

brainfuck, 134 score
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.+++++++++++++++++++++++++++++.+++++++..+++.+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.+++++++++++++++++++++++++++++++++++++++++++++++++++++++.++++++++++++++++++++++++.+++.------.--------.-------------------------------------------------------------------.

Try it online!
Alas, could have scored 89 if not for the 1000 character limit.
Boolfuck, 102 score
;;;+;+;;+;+;+;+;+;+;;+;;+;;;+;;+;+;;+;;;+;;+;+;;+;+;;;;+;+;;+;;;+;;+;+;+;;;;;;;+;+;;+;;;+;+;+;+;+;+;;;;+;+;;+;;+;+;;+;;;+;;;+;;+;+;;+;;;+;+;;+;;+;+;+;;;;+;

Try it online!
"Standard".

I was going to make a brainf*** solution (generated with Python) and it was exactly your solution, so I upvoted it. Nice going! :)

Grass, score 324, 623 bytes
wvwwWWwWWWwvWwwwwWWwWWWwWWWWwWWWWWwWWWWWWwWWWWWWWwWwwwwwwwwwwwwWWWWwWWWWWWWwWWWWWWWWWWWWWWwWWWWWWWWWWWwwWWWWWWWWWWwwWWWWWWWWWWWWwWWWWWWWWWWwwWWWWWWWWWWwwwwwwwWWWWWWWWWWWWWWwWWWWWWWWWWWWWWWWwWWWWWWWWWWWWWWWWWWWWWWwWWWWWWWWWWWWWWWWWWWwwWWWWWWWWWWWWWWWWWWwwWWWWWWWWWWWWWWWWWWwwwwwWWWWWWWWWWWWWWWWWWWWWwwWWWWWWWWWWWWWWWWWWWWWWWwWWWWWWWWWWWWWWWWWWWWWWWWWWwwwwwwwwwwwwwwwwwwwwwwwwwwwWwwwwwwwwwwwWWwwwwwwwWWWwwwwwwwWWWWwWWWWWwwwwwwwwWWWWWWwwwwwwwwwwwwwwwwwWWWWWWWwwwwwwwwwwwwwwwwwwwwwWWWWWWWWwwwwwwwwwwwwwwwwwWWWWWWWWWwwwwWWWWWWWWWWwwwwwwwwwwwWWWWWWWWWWWwwwwwwwWWWWWWWWWWWWwwwwwwwwwwwwwwwwwwWWWWWWWWWWWWWwwwwwwwwwwwwwwwwwwwwwwwwww

Help, WarDoq!, 1 byte, Score: 72
H

Try It Online!

Brain-Flak, 618 bytes, score 265
((((((()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()())()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()())()()()()()()()())()()()()()())[()()()])[()()()()()()()()()()()()()()()()()()()()()()()()])(((((((()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()())()()()()()()()()()()()())()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()())[()()()]))[()()()()()()()])[()()()()()()()()()()()()()()()()()()()()()()()()()()()()()])

Try it online!
Used characters: ()[]
Uses () (one), (...) (sum and push), [...] (negate). Can definitely be shorter by using [] (stack height) but it's not the point of the challenge (as long as the code is under 1000 bytes). Looks like the program can't fit into 1000 bytes using only () and (...).

Python 2, 574 bytes, score 564
exec"%c"%(111+1)+"%c"%(111+1+1+1)+"%c"%(11+11+11+11+11+11+11+11+11+1+1+1+1+1+1)+"%c"%(11+11+11+11+11+11+11+11+11+11)+"%c"%(111+1+1+1+1+1)+"%c"%(11+11+11+1+1+1+1+1+1)+"%c"%(11+11+11+11+11+11+1+1+1+1+1+1)+"e%c"%(11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1)+"%c"%(11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1)+"%c"%111+"%c"%(11+11+11+11)+"%c"%(11+11+1+1+1+1+1+1+1+1+1+1)+"%c"%(11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1+1)+"%c"%111+"%c"%(111+1+1+1)+"%c"%(11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1)+"%c"%(11+11+11+11+11+11+11+11+11+1)+"%c"%(11+11+11)+"%c"%(11+11+11+1+1+1+1+1+1)

Try it online!
Used characters: exc"%(1+)
Constructs the string print'Hello, World!' using the characters "%c(1+), then execs it. Using the raw print with any single extra character costs more than this.

05AB1E, score: 282 (251 bytes)
0>>>0>>>>>>>>>0>0>>>0>>>>>>>>0>>>>>0>>>0 0>>>>>>0>>>>>>>>0>>>>>>>>0>>>>0>>>>>>>0>>0 0>>>>>>>0>>>0 0>>>>>0>>>>>>>>>0>>0>>>0>0>>>>>>0 0>>>>>>>J 0>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>B

Try it online.
Five characters used: 0> JB
Explanation:

First we construct the number 39138530688472073059231607. We do this per digit, by pushing a 0 and increasing it by 1 per >, after which the entire stack of digits is joined together with J.
Then it pushes another 0 with 107 >s to get the number 107.
After which it will convert 39138530688472073059231607 to base-107 with B, which is "Hello, World!".

H, 2 bytes, score 223
hw

Try it online!

Bits, score: 97
There are only 2 distinct characters in Bits, 0 and 1. These have ASCII values of \$48\$ and \$49\$, so the score is \$97\$.
If you're interested, this is actually only 10 bytes (80 bits).
10010000001010011000011000011110111000111111010111001111010010001100000100011101

Explanation
1001000 // H
000101  // e
001100  // l
001100  // l
001111  // o
011100  // ,
011111  //
1010111 // W
001111  // o
010010  // r
001100  // l
000100  // d
011101  // !
        // [implicitly joined and output]

C (gcc), 540 bytes, score 1563
main(){putchar(11+11+11+11+11+11+1+1+1+1+1+1);putchar(11+11+11+11+11+11+11+11+11+1+1);putchar(11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1);putchar(11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1);putchar(11+11+11+11+11+11+11+11+11+11+1);putchar(11+11+11+11);putchar(11+11+1+1+1+1+1+1+1+1+1+1);putchar(11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1+1);putchar(11+11+11+11+11+11+11+11+11+11+1);putchar(11+11+11+11+11+11+11+11+11+11+1+1+1+1);putchar(11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1);putchar(11+11+11+11+11+11+11+11+11+1);putchar(11+11+11);}

Try it online!
This is just a straightforward solution that prints the ASCII code of each character in turn, like some of the other solutions here.  I'm not aware of any tricky way to reduce the score in C.

287 bytes, score 1563

Rust, 35 bytes, Score: 1916
fn main(){print!("Hello, World!")}

I don't know if you can get any shorter in Rust.

Gol><>, 234 bytes, score 259
llllllll+++l+++++lllllllllllll+++++l++++++++llllllllllll+++++l+l+++++++llllllllllll+++l+++++++++lllllllllll+++l++++++++lllllll++ll++l+++++llll+++l+l+lll++l+$llllllll++++++l++l+llllll+++lll+++++llllllll+++++++lll++l+l+l+llllll++++l++$H

Try it online!
Used characters: l (length of stack), + (add top two numbers), $ (swap top two numbers), H.
$ was needed because some characters (space, H) were impossible to create at that specific stack height; it is cheaper than any number literal (minimum being 0).

Gol><>, 182 bytes, score 315
ssP0ssssssPPPP0ssssssPPPPPPPPPPPP0sssssssPP0ssssssPPPPPPPPPPPPPPP0sssssPPPPPPP0ss0ssPPPPPPPPPPPP0ssssssPPPPPPPPPPPPPPP0ssssssPPPPPPPPPPPP0ssssssPPPPPPPPPPPP0ssssssPPPPP0ssssPPPPPPPPH

Try it online!
Used characters: 0 (push zero to the stack), s (add 16 to top), P (increment top), H (halt and print everything on the stack as characters).

Bash, 18 bytes, score 1005
echo Hello, World!

Try it online!

PHP, 13 bytes, score 802
Hello, World!

Try it online!

naz, 732 bytes, score 372
1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1o1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1o1a1a1a1a1a1a1a1o1o1a1a1a1o1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1o1s1s1s1s1s1s1s1s1s1s1s1s1o1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1o1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1o1a1a1a1o1s1s1s1s1s1s1o1s1s1s1s1s1s1s1s1o1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1s1o

Uses 1, a, s and o.
Without the size restriction, naz -u could achieve a theoretical score of 257 by foregoing s.

G*, 15 bytes, score = 914
p Hello, World!

2/9 of an esolang, 1 byte, score = 64
@

But the article says "Every line of code must be exactly 21 characters"

Perl 5, 386 bytes, score = 818
say chr 11+11+11+11+11+11+1+1+1+1+1+1,chr 11+11+11+11+11+11+11+11+11+1+1,chr 11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1,chr 11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1,chr 111,chr 11+11+11+11,chr 1+1+1+1+1+1+1+1+1+1+11+11,chr 11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1+1,chr 111,chr 111+1+1+1,chr 11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1,chr 11+11+11+11+11+11+11+11+11+1,chr 11+11+11

Try it online!

Nim, 387 bytes, score 601
ecHO cHR 11+11+11+11+11+11+1+1+1+1+1+1,cHR 11+11+11+11+11+11+11+11+11+1+1,cHR 11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1,cHR 11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1,cHR 111,cHR 11+11+11+11,cHR 11+11+1+1+1+1+1+1+1+1+1+1,cHR 11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1+1,cHR 111,cHR 111+1+1+1,cHR 11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1,cHR 11+11+11+11+11+11+11+11+11+1,cHR 11+11+11

Try it online!
Chars: ecHRO, +1

Pyth, 430 bytes, score 191
++++++++++++C+++++++++++11 11 11 11 11 11 1 1 1 1 1 1C++++++++++11 11 11 11 11 11 11 11 11 1 1C+++++++++++++++++11 11 11 11 11 11 11 11 11 1 1 1 1 1 1 1 1 1C+++++++++++++++++11 11 11 11 11 11 11 11 11 1 1 1 1 1 1 1 1 1C111C+++11 11 11 11C+++++++++++11 11 1 1 1 1 1 1 1 1 1 1C++++++++111 1 1 1 1 1 1 1 1C111C+++111 1 1 1C+++++++++++++++++11 11 11 11 11 11 11 11 11 1 1 1 1 1 1 1 1 1C+++++++++11 11 11 11 11 11 11 11 11 1C++11 11 11

Try it online!

Deadfish~, 1 byte, score 119
w

Try it online!
Not so interesting

As this is code challenge and has special scoring, please also specify “score 119”.

Excel, 409 bytes, score 558
=CHAR(11+11+11+11+11+11+1+1+1+1+1+1)&CHAR(11+11+11+11+11+11+11+11+11+1+1)&CHAR(11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1)&CHAR(11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1)&CHAR(111)&CHAR(11+11+11+11)&CHAR(11+11+1+1+1+1+1+1+1+1+1+1)&CHAR(11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1+1)&CHAR(111)&CHAR(111+1+1+1)&CHAR(11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1)&CHAR(11+11+11+11+11+11+11+11+11+1)&CHAR(11+11+11)

Link to Spreadsheet

Excel VBA (Immediate Window), 396 bytes, score 457
?CHR(11+11+11+11+11+11+1+1+1+1+1+1)+CHR(11+11+11+11+11+11+11+11+11+1+1)+CHR(11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1)+CHR(11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1)+CHR(111)+CHR(11+11+11+11)+CHR(11+11+1+1+1+1+1+1+1+1+1+1)+CHR(11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1+1)+CHR(111)+CHR(111+1+1+1)+CHR(11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1)+CHR(11+11+11+11+11+11+11+11+11+1)+CHR(11+11+11)

Similar to the Excel answer. Uses 2 fewer unique characters.

You don't need the +s between CHR(...) calls when printing - should get you down to ~ 384 bytes

Go, 61 bytes, score 2527
package main;import."fmt";func main(){Print("Hello, World!")}

Attempt This Online!
The boilerplate hello world, compressed onto 1 line.

Vyxal, 4528 bytes, score 156
..+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+C..+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+C+..+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+C+..+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+C+..+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+C+..+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+C+..+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+C+..+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+C+..+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+C+..+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+C+..+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+C+..+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+C+..+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+C+

Try it Online!
. on its own represents 0.5, so this adds up a bunch of 0.5s, converts them to characters, then concatenates them together. This actually does better than using the builtin kH, which has a score of 179.

Erlang (escript), 439 bytes, score: 1706
Port of the 540 byte C answer. Unique characters:

main([])->o:fwrte1+,.

Which is of length 23, sum 1706.

main([])->io:fwrite([11+11+11+11+11+11+1+1+1+1+1+1,11+11+11+11+11+11+11+11+11+1+1,11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1,11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1,11+11+11+11+11+11+11+11+11+11+1,11+11+11+11,11+11+1+1+1+1+1+1+1+1+1+1,11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1+1,11+11+11+11+11+11+11+11+11+11+1,11+11+11+11+11+11+11+11+11+11+1+1+1+1,11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1,11+11+11+11+11+11+11+11+11+1,11+11+11]).

Try it online!

Newlines are not allowed.

Java (JDK), 468 bytes, score 1234
\u0063\u006c\u0061\u0073\u0073\u0020\u0041\u007b\u0070\u0075\u0062\u006c\u0069\u0063\u0020\u0073\u0074\u0061\u0074\u0069\u0063\u0020\u0076\u006f\u0069\u0064\u0020\u006d\u0061\u0069\u006e\u0028\u0053\u0074\u0072\u0069\u006e\u0067\u005b\u005d\u0061\u0029\u007b\u0053\u0079\u0073\u0074\u0065\u006d\u002e\u006f\u0075\u0074\u002e\u0070\u0072\u0069\u006e\u0074\u0028\u0022\u0048\u0065\u006c\u006c\u006f\u0020\u0057\u006f\u0072\u006c\u0064\u0021\u0022\u0029\u003b\u007d\u007d

Try it online!
Note: I'm stumped on how to make it have less score. Oracle really does make it hard to golf.
Thanks to @ceilingcat for and halfing the score.

Zsh, 464 bytes, score 552
Try it Online!       charset: <${(#)1+}
<<<${(#)$((11+11+11+11+11+11+1+1+1+1+1+1))}${(#)$((11+11+11+11+11+11+11+11+11+1+1))}${(#)$((11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1))}${(#)$((11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1))}${(#)$((111))}${(#)$((11+11+11+11))}${(#)$((11+11+1+1+1+1+1+1+1+1+1+1))}${(#)$((11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1+1))}${(#)$((111))}${(#)$((111+1+1+1))}${(#)$((11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1))}${(#)$((11+11+11+11+11+11+11+11+11+1))}${(#)$((11+11+11))}

Julia, 107 bytes, score 815
print('i'-11-11-11,'p'-11,'n'-1-1,'n'-1-1,'p'-1,',',','-11-1,'n'-11-11-1,'p'-1,'r','n'-1-1,'p'-11-1,','-11)

characters used print('-1,)
Try it online!

AWK, 57 bytes, score 1632
Escape sequences are in octal.
BEGIN{print"\110\145\154\154\157\54\40W\157r\154\144\41"}

Try it online!
Score count

Why the literal “W”? With \127 your score would drop to 1595.

KonamiCode, 168 bytes (score 415)
v(^^^^^^^>^^)<<v(^>>^)<<v(^>>^^^^^^^^)<<v(^>>^^^^^^^^)<<v(^>^>^)<<v(^^^^>^^^^)<<v(^^^>^^)<<v(^>^>^^^^^^^^^)<<v(^>^>^)<<v(^>^>^^^^)<<v(^>>^^^^^^^^)<<v(^>>)<<v(^^^>^^^)<<

Characters used: ^v<>()

Ly, 378 bytes (score 309)
````````````````````````````````````````````````````````````````````````:o`````````````````````````````:o```````::oo```:o,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,:o,,,,,,,,,,,,:o```````````````````````````````````````````````````````:o````````````````````````:o```:o,,,,,,:o,,,,,,,,:o,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,o

Try it online!
Uses four instructions, increment top of stack, duplicate top of stack, decrement top of stack, and print as a character.
 :,o`

MATLAB, 15 Bytes (score 802)
'Hello, World!'

As this is a [code-challenge], I've edited in your score, per the challenge spec

Pascal, 1449

2189:
The boilerplate Hello World reads:
program p(output); begin writeLn('Hello, World!') end.

2080:
Since Pascal is case-insensitive we can capitalize keywords and identifiers.
This lowers the score because capital letters come before lower-case letters:
PROGRAM P(OUTPUT); BEGIN WRITELN('Hello, World!') END.

1706:
Now, as some keywords are non-optional and our program needs definitely needs at least one string or char literal in conjunction with some write, we can reuse the preexisting letters in our Hello, World! string.
ProGrAM P(oUTPUT); BeGIN WrITe('Hello, World!') eNd.

The now lower-cased letters already appear as part of Hello, World!.
Only H, l, , and ! are “new” letters which aren’t found in the rest of the program.
1449:
Let’s avoid any characters from set of ['H', 'l', ',', '!'] by using “preexisting” letters and the built-ins we can use with them.
If we are running this program on a system using the ASCII character set as its base, we can use pred('I') to retrieve the value 'H' without writing a char literal 'H':
ProGrAM P(oUTPUT); BeGIN WrITe(Pred('I')); WrITe('e'); WrITe(Pred(Pred(Pred('o')))); WrITe(Pred(Pred(Pred('o')))); WrITe('o'); WrITe(Pred(Pred('.'))); WrITe(' Wor'); WrITe(Pred(Pred(Pred('o')))); WrITe('d'); WrITe(Pred(Pred(Pred(Pred(Pred(Pred(''''))))))) eNd.

This program merely requires an ISO standard 7185 “Standard Pascal” processor (level 0 sufficient).
It has a total size of 216 bytes thus below the eight, uhh… whoops, one thousand byte limit.

C# (.NET Core), 71 bytes (score 2563)
class a{static void Main(){System.Console.WriteLine("Hello, World!");}}

Try it online!
I'm just starting with C#, so maybe there's a way to do it even shorter

Welcome to CGCC! 67 bytes (score 2487)

Gema, 59 characters, score 858
\A=\110\145\154\154\157\054\040\127\157\162\154\144\041@END

(Doh. After all these years, now I discovered that Gema function names are case insensitive.)
Sample run:
bash-5.2$ gema '\A=\110\145\154\154\157\054\040\127\157\162\154\144\041@END'
Hello, World!

Try it online!

source: Stack Exchange

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

sort: votes


text:
2D interpolation
Given required values for an expression with 2 variables, output a short expression which fulfill these values
Input
You may take the input in any reasonable format, e.g. f(x,y)=z, {(x, y): z}, [[[x,y],z]], but please write what format is your input is taken in
Output
Your output needs the be a valid infix expression for two variables, and it has to output the correct value when rounding the output to three digits after the comma, but the current value isn't rounded during calculation. The following symbols/operators are allowed:
symbols
x - the first input variables
y - the second input variables
pi - 3.1415 (4 digit precision)
e - 2.7182 (4 digit precision)
every possible numeric constant (1, 0.12, 42, 13.241)

operators
+ sum of two values, in the format a+b
- difference of two values, in the format a-b
* multiplication of two values, in the format a*b
/ division of two values, in the format a/b
^ power of two values, in the format a^b
|| absolute value, in the format |a|
() parentheses, in the format (a)
floor the floor of a value, in the format floor(a)
ceil the ceil of a value, in the format ceil(a)

if I forgot anything that you think is important tell me in the comments please.
Example Testcases
other expressions are okay if they result in the correct values
f(0.12, 0.423) = 3.142
f(0.89, 0.90) = 3.142
|
\/
pi (3.1415 gets rounded to 3 digits after the comma - 3.142)

f(0.12, 0.423) = 0.543
f(0.89,0.9)=1.79
|
\/
x+y

Score
Your score is the average length of expression for the following input: https://pastebin.com/tfuBjpc6 , where each batch of inputs (a different function) is separated by a newline. You can transform the format to any format your program accept.
Good luck!

Since the score depends on the size of the expressions, I guess the program is supposed to be deterministic. Is that correct?

It doesn't have it be, it's goal is that the average expression length would be minimal.

You might want to specify a little bit better on what input values we should score our programs. Even if you set the seed to a specific value in your scorer program, that only works for Python programs. Different submissions will be scored differently from eachother.

the generate_expression code should call the program (i.e. by executing a shell command), but I think I should randomly generate expressions and then post there values in here and the average length of these would be counted

I edited it to include the test-battery tag, and a link to the list of tested values

could the answer be a more complex expression like (x+y)^x?

@Jonah yes, it can be any valid expression

@SurculoseSputum fixed, the file was duplicated with an incorrect version

Do all of the examples in the test battery have 5 contraints?

@AdHocGarfHunter yes

@CommandMaster Great challenge, and the strict format for expression is great at allowing language neutrality. I just want to clarify one point - must the expression use both variables (meaning it must contain x and y)? The example shows otherwise. And if it is allowed to give pi as an answer for output 3.142, can one give 0.123 when the output is 0.123 (since numeric constants are valid part of expression)?

yes, you can just use pi or 0.123, the expression doesn't have to include both variables

@CommandMaster Would you mind sharing how is the input data generated?

I made a script to recursively choose random operations/consts

@CommandMaster What I meant was that the answer can be simply the output - lambda x, y, z: str(z), which is the shortest in most cases (and a scan for all length 5 expressions would suffice to eliminate that too). I think it should be prohibited, so the answer actually has to look for some expression.

C++ (gcc), score: 39.2533
Interpolate xs or ys and fs with lagrange interpolation.
#include <iostream>
#include <string>
#include <cstdio>
#include <cstring>
#include <sstream>
#include <iomanip>
#include <cstdlib>
#include <cmath>
#include <set>
using namespace std;
string ml(const string& a,const string& b) {
	if(a.size()<b.size()) return a;
	return b;
};
string prt(double x,int g,int d=0) {
	char buf[100],buf2[100];
	sprintf(buf,"%%+.%dlf",g);
	sprintf(buf2,buf,x);
	string s=buf2;
	while(s.size()&&s.back()=='0') s.pop_back();
	if(s.size()&&s.back()=='.') s.pop_back();
	if(s=="-0") s="+0";
	if(s=="+3.1415") s="+pi";
	if(s=="-3.1415") s="-pi";
	if(s=="+2.7182") s="+e";
	if(s=="-2.7182") s="-e";
	return s;
};
int main()
{
	double tl=0; int tc=0;
	while(1)
	{
		double x[5],y[5],f[5];
		int bad=0;
		char s[2][20];
		for(int j=0,k;j<5;++j)
		{
			if(scanf("%s %s",s[0],s[1])==EOF) {
				bad=1; break;
			}
			s[0][strlen(s[0])-1]=0;
			sscanf(s[0]+2,"%lf",x+j);
			for(k=0;s[1][k]!=')';++k) ;
			s[1][k]=0;sscanf(s[1],"%lf",y+j);
			sscanf(s[1]+k+2,"%lf",f+j);
		}
		if(bad) break;
		set<double> dx,dy;
		for(int j=0;j<5;++j) dx.insert(x[j]),dy.insert(y[j]);
		string ans; ans.resize(2000);
		auto work=[&](double*d,char s) {
			double md=0;
			stringstream ss;
			double p[5];
			memset(p,0,sizeof p);
			for(int j=0;j<5;++j)
			{
				double w=f[j];
				md=max(md,fabs(d[j]));
				for(int k=0;k<5;++k) if(j!=k)
					w/=d[j]-d[k];
				double q[5];
				memset(q,0,sizeof q);
				q[0]=w;
				for(int k=0;k<5;++k) if(j!=k)
					for(int s=4;s>=0;--s)
						q[s]=(s?q[s-1]:0)-q[s]*d[k];
				for(int k=0;k<5;++k) p[k]+=q[k];
			}
			for(int j=0;j<5;++j)
			{
				double prec=1.0/10000/pow(md,j);
				int u=0;
				while(prec<1) prec*=10,++u;
				string w=prt(p[j],u);
				if(w=="+0") continue;
				ss<<w;
				if(j) ss<<"*"<<s;
				if(j>=2) ss<<"^"<<j;
			}
			string o=ss.str();
			if(o.size()&&o[0]=='+') o.erase(o.begin());
			if(!o.size()) o="0";
			if(o.size()<ans.size()) ans=o;
		};
		if(dx.size()==5) work(x,'x');
		if(dy.size()==5) work(y,'y');
		tl+=ans.size(); ++tc;
		cout<<ans<<"\n";
	}
	cerr<<setprecision(4)<<fixed;
	cerr<<tl/tc<<"\n";
}

The output looks like:
-265.3786-74.29574*x+344.81918*x^2+225.130398*x^3+36.610661*x^4
35.1581-3.27602*y+0.113946*y^2+0.412073*y^3-0.080117*y^4
-14.961
0.3769+0.50931*x-0.172598*x^2-0.0317501*x^3+0.0113617*x^4
-9.3762-1.54567*y+9.224426*y^2+5.413074*y^3+0.8106773*y^4
-3.7267-3.1155*x+0.011054*x^2-0.002775*x^3-0.0010706*x^4
1
4
31.8856+38.31442*x-0.94623*x^2-24.221891*x^3-8.086617*x^4
0.4856+0.08145*y+0.084768*y^2+0.0113*y^3+0.0001758*y^4

cool! You might be able to combine the constants in the final equation for better score?

How does it take input?

I think just feed the sample through stdin. @CommandMaster

Yeah I may try to improve on that later. It's a bit more difficult than it looks because of the problems with precision. @CommandMaster

C (gcc), 798 bytes, score: 3.323226 or 16.521740
There are two versions of the code. The less cheaty version will output an expression in form of x * y * 0 + z, while the more cheaty version will output an expression in form of z.
Obviously creating a "real" solution would bump the score down, but given that it's just a tiny gain and as far as I can tell it's a NP-complete problem, it's simply not worth doing it (some edge cases where you tell a 7-long number that's for instance x+1, then you lose a few points, but it's not significant this much).

cheaty/ Average length: 11618 / 3496: 3.323226
less cheaty/ Average length: 57760 / 3496: 16.521740

The code:
float round(float x) {
    float v = (int)(x * 1000 + .5);
    return (float)v / 1000;
}

char * find_constants(float f) {
	float x = round(f);
	static char buf[16];
	if(x == 3.142) return "pi";
	if(x == 2.718) return "e";
	sprintf(buf, "%.3g", f);
	return buf;
}

int main(void) {
	float x, y, z;
	long total_len = 0, amount = 0;
	while(scanf("%f %f %f", &x, &y, &z) == 3) {
		#ifdef LESS_CHEATY
			total_len += strlen(find_constants(x))+strlen(find_constants(y))+strlen(find_constants(z))+4;
			// printf("%s*%s*0+%s\n", find_constants(x), find_constants(y), find_constants(z));
		#else
			total_len += strlen(find_constants(z));
			// printf("%s\n", find_constants(z));
		#endif
		amount++;
	}
	printf("Average length: %d / %d: %f\n", total_len, amount, (float)total_len / (float)amount);
}

Try me online!

I believe you should consider the restrictions separated by one blank line to be for one function instead of considering each of them to be separated ones.

each batch of input is separated by an excess newline, you need to be able to interpret the function when given multiple values of it in different points

Also you can use the name x directly instead of stating that value when you want.

from what I understand and understood, every single of these makes a distinct equation, the challenge is understated and leaves too many loopholes.

I agree the question is unclear, but it's not a loophole I would say. You're supposed to treat every five equations to be restrictions on one function you generated.

where is this stated? required values bit may refer not to set of equations, but values themselves (a, b, z)

I think where each batch of inputs (a different function) is separated by a newline. on the score section. Also example testcases is also suggesting it. tbh I also didn't realize what's going on until I found the weird line breaks in the testcase.

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


text:
Cook me a character meal
Chef Avillez is about to cook us some really nice meal. He is just waiting for us to give him some ingredients and to request a meal.
Task
Given a list of ingredients (strings matching /[a-z]+/) and a requested meal (string matching /[a-z][a-z ]*/) output the integer amount of meals Chef Avillez can make.
Algorithm
Each letter ([a-z]) in the ingredient list contributes with one character for the soon-to-be-cooked meals. Each portion of our requested meal costs as many of each character as there are in the request string, excluding spaces.
For example, if our requested meal is "bacon" and the ingredients are "banana" and "coconut", the output is 1 because in "bananacoconut" there is only one b, and for each portion of "bacon" we need one "b".
Input
A list of ingredients in any reasonable format, like

a list of strings
a list of lists of characters
a (whatever-you-please)-separated list of ingredients, in a single string

and a requested meal in any reasonable format, like

a string
a list of characters

Output
A non-negative integer representing the amount of meals that can be cooked.
Test cases
A Python reference implementation is available.
['spam', 'spam', 'spam', 'spam', 'bacon', 'eggs', 'eggs', 'bacon', 'spam'], 'beans' -> 2
['bacon', 'bacon', 'bacon', 'bacon', 'bacon'], 'bacon' -> 5
['banana', 'coconut'], 'bacon' -> 1
['acon', 'bcon', 'baon', 'bacn', 'baco'], 'bacon' -> 4
['tomato', 'oregano', 'pizza', 'chocolate'], 'bacon' -> 0
['strawberries', 'figs', 'chocolate', 'sardines'], 'cod fish' -> 1
['these', 'are', 'some', 'random', 'words', 'wow'], 'or' -> 3
['some', 'more', 'delicious', 'ingredients', 'here'], 'bolognese' -> 0
['some', 'delicious', 'ingredients', 'here', 'are', 'bliss'], 'bolognese' -> 1
['some', 'bountiful', 'bagful', 'of', 'ingredients', 'here', 'are', 'bliss'], 'bolognese' -> 1

May we take input as a list of characters? (Ignoring that there are separate words, since they serve no purpose.)

The point here is that the ingredient list does represent a list, so I don't know if I'm comfortable allowing that.

@RGS Imagine a comma-separated list without commas. (in fact, a comma-separated list will also often work similarly to a normal list of characters) Is it intended that in the examples, no meal uses the same character twice?

I (and my program) counted 4 "or" in "there are some random words wow" because there are 4 "o" and 4 "r", but your case says 3? What am I missing?

@mypronounismonicareinstate ah, I typed in "there" instead of "these" for the program.

May we take everything in uppercase instead?

@Arnauld be my guest; also, just edited the test cases so pls check that :)

@mypronounismonicareinstate good point. Also, no it was not intended. edited the test cases to add two of those.

Suggest something like ['some', 'bountiful', 'bagful', 'of', 'ingredients', 'here', 'are', 'bliss'] bolognese -> 1 as a test case, since it makes the duplicated letter the limiting factor, and includes an incomplete portion for a recipe (3 os total, 2 needed for a recipe).

Suggested test case: the one suggested above by @Xcali, or something like ['test','test'], tt -> 2. The suggested 4-byter in the comments of the 05AB1E answer works for all current test cases, but fails for these two test cases due to the duplicated letters.

cod fish (with a space) doesn't match the meal regex. Could you fix it?

@OlivierGrégoire yes it does, the meal regex has a space next to the character range a-z!

@Xcali nice suggestion, I included it :)

I'm disappointed that none of the example recipes involve copious amounts of spam.  And your reference implementation is written in Python no less...

@DarrelHoffman you are absolutely right, I am embarrassed! Would you like to suggest a recipe, or should I take care of that?

I suppose to be less obvious you could go with "spam spam spam spam bacon egg and spam" and search for "beans"...

What purpose does the space character have here? Seems like unnecessary fluff that will just have every answer have to filter out spaces.

...and if it does serve a purpose, or you do not want to change it now you have 18 answers, then I think you should add a test where the meal is just space characters.

...furthermore, the reference implementation does not work when the meal is only spaces.

@JonathanAllan thanks for your feedback; the space character was to mimic the way we naturally write words (and hence meal names). As for the test case with only space characters, I would oppose to adding it because it corresponds to requesting no meal. The problem lies, then, in my specification for the meal as /[a-z ]+/ because I have to rule out the string with only spaces. ("Fixing" the reference implementation would mean adding a default argument to the min function.)

Yeah, I think the best thing would be to just guarantee the meal will contain at least one non-space character.

Related: the Chief programming language https://www.dangermouse.net/esoteric/chef.html

Python 2, 95 71 70 55 bytes
lambda i,m:min(i.count(c)/m.count(c)for c in m if" "<c)

Try it online!
Input: Ingredients i as a comma-separated string, and a meal m as a string.
Output: Max number of meals that can be made.
How: Divides the frequency of each character in the ingredient by its corresponding character in the meal, then takes the minimum.

Ruby, 55 50 bytes
Meal (m) is a list of characters, and Ingredients (i) is a single string with ingredients separated by spaces.
-5 bytes from Dingus.
->m,i{(m-[' ']).map{|c|i.count(c)/m.count(c)}.min}

Try it online!

Do you need .uniq?

@Dingus you are correct; I don't.

J, 29 27 26 bytes
<./@(=/<.@%&(+/)]=/]);@cut

Try it online!
-2 bytes thanks to Bubbler
-1 byte thanks to FrownyFrog
Inspired by ValueInk's ruby answer -- be sure to upvote him.
Both args are strings.  Meal is right arg.  Ingredients are left arg and taken as space separated string.
Consider the example:
'banana coconut' f 'ba con'

-.&' ' removes the spaces from the right arg:
'banana coconut' <./@(=/<.@%&(+/)]=/]) 'bacon'

Now the main verb is a fork whose tines are =/ and ]=/].  ] is the right arg so that the right tine runs as 'bacon' =/ 'bacon':
1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 0 0 1 0
0 0 0 0 1

And the left tine becomes 'banana coconut' =/ 'bacon':
1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 0 0 1 0
0 0 0 0 1
1 0 0 0 0
0 1 0 0 0
0 0 0 0 1
0 1 0 0 0
0 0 0 0 1
0 1 0 0 0
0 0 0 0 0
0 0 1 0 0
0 0 0 1 0
0 0 1 0 0
0 0 0 1 0
0 0 0 0 1
0 0 0 0 0
0 0 0 0 0

Now take the rowwise sum &(+/) of each, which results in:
1 1 1 1 1  NB. right tine
1 3 2 2 3  NB. left tine

In the right tine (meal), the number at index i is the count of meal letter i within meal (all 1 in this example because the letters are unique).
In the left tine (ingredients), the number at index i is the count of meal letter i within ingredients.
We divide those elementwise 1 3 2 2 3 % 1 1 1 1 1 = 1 3 2 2 3, rounding down <.@ each element to handle fractional amounts (not relevant in this example).
Finally we take the min <./@ of the whole result, which in this case is 1.  This reflects the constraint of having a single b in our ingredients, limiting the number of meals we can make to 1.

Fails at ingredients bb bb, meal b b. I think you need to filter out the spaces from the meal (or both args) first.

@Bubbler Thanks.  Fixed.  It's almost double APL now.  See any way to improve?

27, also fixing possibly fractional outputs on bbb bb / b b.

;@cut to remove spaces

@FrownyFrog Good one, thanks.

JavaScript (ES6),  59 ... 51  50 bytes
Takes input as (ingredients)(meal), where ingredients is the list of ingredients as a comma-separated string and meal is a list of characters. All names are expected in upper case.
Returns false instead of 0.
s=>g=m=>m.every(c=>s<(s=s.replace(c))|++c)&&1+g(m)

Try it online!
Commented
s =>                   // s = list of ingredients
  g = m =>             // g is a recursive function taking m[] = meal,
                       // as a list of characters
    m.every(c =>       // for each character c in m[]:
      s < (            //   test whether s is less than ...
        s =            //     ... the updated value of s where ...
          s.replace(c) //       ... the 1st occurrence of c is replaced with 'undefined'
      )                //   end of comparison (falsy if c was not found)
      | ++c            //   force a truthy result if c is a space
    ) &&               // end of every(); if successful:
      1 + g(m)         //   increment the final result and do a recursive call

If it cannot make the recipe, that returns false.  That doesn't count as an integer, does it?

@Xcali As per Meta consensus, if it quacks like a number, it's a number.

And yet, empty string, which quacks like a number in many languages, isn't allowed for zero.  I think we need to get consistent, but that's a discussion for meta, not here.

Now with some lovely SPAM!

Fails when the meal is entirely composed of space characters.

@JonathanAllan Good point. If that's allowed, I suppose the expected answer is $+\infty$, right?

Well, it's undefined but, yes, +inf would make some sense. I think it was an oversight by OP, I don't really know why spaces are even allowed in the meal.

I think many answers will probably fail with such input, RGS will no doubt guarantee at least one non-space character.

Java (JDK), 94 bytes
a->s->{var z=new int[91];for(var c:a)z[c]++;for(;;z[0]++)for(var c:s)if(z[c]--<1)return z[0];}

Try it online!
Both inputs are uppercase letters to save a byte. If not allowed, please tell me, I'll fix it and add the byte.
Credits

Kevin Cruijssen for tidying up the inputs

@KevinCruijssen Yeah, I'm lazy this morning. But since you did the job, I incuded it, thanks ;-)

And taking the input as uppercase is allowed. The JavaScript answers does the same after it was asked in the comments to OP.

05AB1E, 10 9 bytes
-1 byte thanks to Kevin Cruijssen
Jsθáδ¢`÷ß

Try it online! or validate all test cases.
Takes the ingredients as a list of strings, and the meal as a list of characters.
J                  # join each input
 sθ                # get the last input (meal)
   á               # keep only letters
    δ¢             # double-vectorized count occurences
      `            # dump to the stack
       ÷           # integer division
        ß          # minimum

APL (Dyalog Extended), 15 bytes
⌊⌂dab⍛(⌊/⍧÷⊣⍧⊣)

Try it online!
A dyadic train which takes the meal as its left arg and space-separated ingredients as right arg. (Comma-separated ingredients should work equally well.)
How it works
⌊⌂dab⍛(⌊/⍧÷⊣⍧⊣)  ⍝ Left: meal, Right: ingredients
 ⌂dab⍛(       )  ⍝ Remove all spaces from the meal
         ⍧       ⍝ Counts of each char of meal in the ingredients
          ÷      ⍝ Divided by
           ⊣⍧⊣   ⍝ Counts of each char of meal in the meal
       ⌊/        ⍝ Minimum
⌊                ⍝ Floor (the result of division might be fractional)

Without the space-handling requirement, the code would be 9 bytes:
⌊/⍤⌊⍧÷⊣⍧⊣

Try it online!

C# (Visual C# Interactive Compiler), 54 63 60 bytes
s=>t=>t.Min(x=>x>32?s?.Count(c=>c==x)/t.Count(c=>c==x):null)

Min can calculate the minimum selectively if int? objects are used. To obtain such objects, I use the ?. operator: s will never be null, but it casts int to int? for 1 byte anyway.
Try it online!

Perl 5 -nlF, 54 47 39 bytes
Shoutout to @Grimmy for helping me fix an issue with no net gain of bytes
$_=<>;$j++while s/$F[$j%@F]//x;say$j/@F

Try it online!
First line of input is the recipe; second line contains the ingredients (doesn't matter how or if they're separated).

What’s the point of $#j when you don’t use @j? Change both $#j to $j for -2.

@Grimmy because I need it to start at -1 so that the first ++ results in it evaluating to 0.  Otherwise, I'd need to subtract 1 off of it before the final division.  That would add back the two bytes you're gaining.

You’re right, it’s only -1, not -2.

Also your code doesn’t handle spaces correctly. This can be fixed by adding /x.

@mypronounismonicareinstate I don't see the problem there.  Why isn't 1 the correct answer?

@mypronounismonicareinstate I see 3 os in the recipe and 3 in the ingredients.

@mypronounismonicareinstate  Still the same thing.  The dish has two, and the ingredients have 3.

If so, I think I misunderstood the order of the arguments.

Retina, 48 bytes

%O`.
L$`\G((.)\2*)(?=.*¶.*?(\1)+)?
$#3
N`
1G`

Try it online! Link includes test suite. Takes input as dish on the first line and space-separated ingredients on the second line but the test suite uses a more convenient comma separator. Explanation:

Delete spaces in the dish and ingredients.
%O`.

Separately sort the letters in the dish and ingredients.
L$`\G((.)\2*)(?=.*¶.*?(\1)+)?
$#3

For each distinct letter in the dish, count the number of times its appearance in the dish divides into its appearance in the ingredients.
N`

Sort the counts.
1G`

Take the minimum.

Pyth, 16 bytes
hSmL//hQd/eQdsce

Try it online!
Explanation
hSmL//hQd/eQdsce(Q)
                (Q)  : Implicit evaluated input
               e     : Get last element of input
              c      : Split string at spaces
             s       : Concatenate split strings
   L                 : Lambda with argument named d
       Q             : Evaluated input
      h              : Get first element of input
     /  d            : Count occurrences of d in first element of input
           Q         : Evaluated input
          e          : Get last element of input
         /  d        : Count occurrences of d in last element of input
    /                : Divided occurrences of d in first element of input by occurrences of d in last element of input
  m                  : Map the lambda over last element of input
 S                   : Sort the result of the map
h                    : Get the first element from result of sort

C (gcc), 135 133 bytes
Expects ingredients and request as command line arguments (the last one is the request). The return value of the program is the result.
l[128],n;char*a;main(c,v)char**v;{for(++v;c---2;)for(a=*v++;*a;++l[*a++]);for(a=*v,n=l[*a];*a;++a)n=*a-32&&l[*a]<n?l[*a]:n;return n;}

Python 3, 117 \$\cdots\$ 103 70 bytes
Saved a whopping 33 bytes thanks to Surculose Sputum!!!
f=lambda l,m:all(e in l and[l.remove(e)]for e in m if' '<e)and-~f(l,m)

Try it online!

@RGS Don't understand why or how you edited my answer but you did it just after I updated my answer.

I didn't mean to be rude, sorry, I just updated the TIO link you gave because I had to add 2 more test cases to the challenge and I didn't want to bother you with that ^^'

@RGS Ah, ok I'll add them myself.  Maybe a comment with a TIO link wouldn't be so intrusive.

You are right, that is a much better alternative -.- Thanks for being understanding.

@Noodle9 I think taking all ingredients as just one string/list will save some bytes (which seems to be allowed, by looking the other answers here). Also, recursion might get rid of the outer while loop.

@SurculoseSputum Thought that wasn't allowed. Great - thanks!

70 bytes by putting the for loop inside a generator. Returns False for 0.

@SurculoseSputum Oh, wow! Very interesting how False is allowed as a return for 0. Brilliant - thanks! :-)

Japt, 17 bytes
kS £V¬èX zU¬èXÃrm

Try it

Erlang (escript), 81 bytes
To fix the bug I had to switch to filtering.
f(I,M)->lists:min([length([X||X<-I,X==C])div length([X||X<-M,X==C])||C<-M,32<C]).

Try it online!
Explanation
f(I,M)->       % Function with operands I and M
lists:min(     % Find the minimum of this list.
[length(       % Find the length of:
[X||X<-I,X==C] % I items only containing C
)div           % Integer-divided by
length(        % the length of
[X||X<-M,X==C] % M items only containing C
)||C<-M,       %Ｗｈｅｒｅ　ｔｈｅ　ｉｔｅｍ　ｉｓ　ｔａｋｅｎ　ｆｒｏｍ　Ｍ
32<C]          % and the current item is larger than the space
).

Unless I'm doing something wrong with the input (I don't know Erlang), test case "test,test","tt" outputs 1 instead of 2.

@KevinCruijssen Is there anything else I need to fix?

Not sure, I haven't tried all test cases on your answer. I was simply checking if all existing answers would work for that test case I mentioned, as well as the one mentioned by Xcali in the comment of the challenge description, and simply noticed yours didn't for the "test,test","tt". :)

JavaScript (V8), 136 bytes
(a,b)=>{b=b.filter(a=>" "!==a),c=-1,d=!1;do c++,d=!0,b.forEach(b=>-1==(i=a.indexOf(b))?d=!1:a.splice(i,1)),c=d?c:c--;while(d);return c};

Input:

Ingredients: array of characters
Meal: array of characters

Original commented code (a=ingredients, b=meal, c=meals, d=yes):
f = (ingredients, meal) => { // es6 arrow function syntax
    meal = meal.filter(i => i !== ' '); // delete all the spaces
    meals = -1 // set number of meals to -1, since we'll be adding one later on
    yes = false // yes is whether there are any meals left to make
    do { // do...while instead of while so it runs at least once
        meals++; // increment meals
        yes = true; // yes there is a meal to make
        meal.forEach(v => { // es6 arrow function for each character of the meal
            return (i = ingredients.indexOf(v)) == -1 ? // ternary operator, set i to index of character in ingredients, then check if its -1
                yes = false // if it is we can't find the character, so we can't make a meal
                    : ingredients.splice(i, 1) // we take out the letter from the ingredients list
        });
        meals = // assign to meals
            yes ? // ternary operator, check if we made a meal
                meals : meals-- // if we didn't make a meal then decrement meals
    } while (yes) // repeat if we made a meal
    return meals; // return the number of meals
}

Methods mentioned:

arrow function
ternary operator
do...while

Try it online!

MS SQL Server 2017, 300 bytes
CREATE FUNCTION F(@ NVARCHAR(MAX),@R NVARCHAR(MAX))RETURNS
TABLE RETURN WITH A AS(SELECT LEFT(@R,1)C,STUFF(@R,1,1,'')R
UNION ALL SELECT LEFT(R,1),STUFF(R,1,1,'')FROM A
WHERE R!=''),B AS(SELECT(LEN(@)-LEN(REPLACE(@,C,'')))/COUNT(*)OVER(PARTITION BY C)R
FROM A WHERE C LIKE'[A-Z]')SELECT MIN(R)R FROM B;

Try it on db<>fiddle.

Charcoal, 15 bytes
Ｉ⌊ＥΦη№βι÷№θι№ηι

Try it online! Link is to verbose version of code. Takes input as a space-separated list of ingredients on the first line and the dish on the second line. Explanation:
    η           Second input (dish)
   Φ            Filter over characters
     №          Count of
       ι        Current character
      β         In lowercase alphabet
  Ｅ             Map over characters
         №      Count of
           ι    Current character
          θ     In ingredients
        ÷       Integer divide by
            №   Count of
              ι Current character
             η  In dish
 ⌊              Take the minimum
Ｉ               Cast to string
                Implicitly print


text:
Draw an ASCII oak tree (or a woman with curly hair?)
Task
Your task is to draw these beautiful oak trees:
1 ->
 @@@
@@@@@
@|.|@
_|_|_

2 ->
   @@
 @@@@@@
@@@@@@@@
@@| .|@@
  |  |
__|__|__

3 ->
   @@@@@
 @@@@@@@@@
@@@@@@@@@@@
@@@|   |@@@
  @|  .|@
   |   |
___|___|___

4 ->
      @@
   @@@@@@@@
 @@@@@@@@@@@@
@@@@@@@@@@@@@@
@@@@|    |@@@@
  @@|   .|@@
    |    |
    |    |
____|____|____

5 ->
      @@@@@
   @@@@@@@@@@@
 @@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@
@@@@@|     |@@@@@
  @@@|    .|@@@
     |     |
     |     |
     |     |
_____|_____|_____

6 ->
      @@@@@@@@
   @@@@@@@@@@@@@@
 @@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@
@@@@@@|      |@@@@@@
  @@@@|      |@@@@
     @|     .|@
      |      |
      |      |
      |      |
______|______|______

(that one sandbox commenter felt were similar to women with curly hair!)
The trees are allowed to be surrounded by any extra whitespace your solution creates as long as that doesn't break the tree, of course.
Algorithm
As per the examples above, we take n to represent the width of the trunk and the specs of the tree will be given in terms of that.
Given n:

the height of the trunk is n + 1;
the width of the trunk in space characters is n;
the top row of the trunk is n times the character @, followed by |, n times the space character , another vertical pipe | and then n times @.
from the reference row up to the top of the crown, we only use @ as follows:

there is one row with the same width as the reference row and each subsequent row above is shortened by one @ than the previous shortening;

from the reference row downwards, we chop 2 @ from each side and then each row we go down, we chop one more @ than the previous row;
the last trunk row that is surrounded by a @ has a . immediately to the left of the right vertical pipe |;
the bottom most row has the underscore _ in all the tree width, except where the trunk vertical pipes | are.

Do we have to draw the tree/woman or can we return a list of strings? Not only saves bytes but makes the code testable! :D

@Noodle9 I am not entirely sure what is standard practice for [tag:ascii-art] contests, I guess I'd have to look it up

It appears like you can return a list of strings

That's great - thanks! :-)

What range of input n must the program handle? Any value or just the 6 shown in the task?

In algorithm step 4, do you mean each subsequent row above is shortened by two @ symbols, one from each side, as the examples show?

@spuck your program should work in theory for any n. If your language overflows at some point or you blow some recursion limit or wtv, that is fine.

@spuck look at the tree for n=6: you have a full row of @, then you cut one on each side, then you cut two on each side, then you cut three on each side and then you cut 4 on each side, which happens to give an empty row, so that is the end of the crown :)

Is step six an acorn of the oak tree/beauty mark of the curly-haired woman?

@MarkStewart I thought that's a hole where you'd enter to be in the tree, part of the tree! :D

That period (or nose) is making me irrationally angry compared to the rest of this haha!

Do you have a cool solution that misses the period?

JavaScript (ES8),  215 ... 199  197 bytes
f=(n,k=(W=3*n+2)**.5-.5|0,x=.5-k-(W-n)**.5,R=(n,k)=>S=''.padEnd(n,'.@_'[k]))=>k+n+2?(w=k*-~k/2,k<0?(x>0?s=R(n,k+n+3):R(w+=~k,s=R(n-1)+R(1,~~x))+R(n-w,1))+`|${s}|`+S:R(w)+R(W-w*2,1))+`
`+f(n,k-1):''

Try it online!
or Test it online! against an ungolfed, straightforward implementation
How?
We define \$H\$ as the height of the upper part of the crown (where the width is increasing) and \$h\$ as the height of the lower part (where the width is decreasing).
Example for \$n=6\$:

We have:
$$H_n=\left\lfloor\sqrt{3n+2}+\frac{1}{2}\right\rfloor$$
and:
$$h_n=\left\lfloor\sqrt{2n+2}-\frac{1}{2}\right\rfloor$$
By computing these values beforehand, we can draw the tree from top to bottom with a single loop, which is implemented here as a recursive function.
The total height of the tree is \$H_n+n+1\$. We use a counter \$k\$ going from \$H_n-1\$ to \$-n-1\$.
 3 | ......@@@@@@@@       | upper crown
 2 | ...@@@@@@@@@@@@@@    |
 1 | .@@@@@@@@@@@@@@@@@@  |
 0 | @@@@@@@@@@@@@@@@@@@@ |
---+----------------------+-------------
-1 | @@@@@@|      |@@@@@@ | lower crown
-2 | ..@@@@|      |@@@@   |
-3 | .....@|     .|@      |
---+----------------------+-------------
-4 |       |      |       | trunk only
-5 |       |      |       |
-6 |       |      |       |
---+----------------------+-------------
-7 | ______|______|______ | roots

The number of leading spaces for the upper part of the crown is the \$k\$-th triangular number:
$$T_k=\frac{k\times(k+1)}{2}$$
The number of leading spaces for the lower part of the crown is given by:
$$\frac{(k+1)\times(k-2)}{2}=T_k-k-1$$
Commented
f = (                         // f is a recursive function taking:
  n,                          //   n = input
  k = (W = 3 * n + 2)         //   W = 3n + 2 = total width of the tree
      ** .5 - .5 | 0,         //   k = counter, initialized to floor(sqrt(W) - 1/2)
  x = .5 - k - (W - n) ** .5, //   x = 1/2 - k - sqrt(W - n)
  R = (n, k) =>               //   R is a helper function returning and saving in S:
    S =                       //     a character identified with k ('.', '@', '_' or
      ''.padEnd(n, '.@_'[k])  //     a space) repeated n times
) =>                          //
  k + n + 2 ?                 // if k is not equal to -n - 2:
    ( w = k * -~k / 2,        //   initialize w to the k-th triangular number
      k < 0 ?                 //   if k is negative:
        ( x > 0 ?             //     if x is positive (trunk only or roots):
            s =               //       set s to:
              R(n, k + n + 3) //         '_' * n if k = -n - 1, or space * n otherwise
          :                   //     else (lower crown):
            R(                //       append ...
              w += ~k,        //         ... w - k - 1 spaces
              s = R(n - 1) +  //         and set s to n - 1 spaces followed by
                  R(1, ~~x)   //         '.' if floor(x) = 0, or another space otherwise
            ) +               //
            R(n - w, 1)       //       append '@' * (n - w)
        ) +                   //
        `|${s}|` +            //     append s surrounded by '|' characters
        S                     //     append S
      :                       //   else (upper crown):
        R(w) +                //     append w spaces
        R(W - w * 2, 1)       //     append '@' * (W - 2w)
    ) +                       //
    `\n` +                    //   append a line-feed
    f(n, k - 1)               //   append the result of a recursive call with k - 1
  :                           // else:
    ''                        //   stop recursion

Just knew as soon as I caught up to you, you'd golf a few bytes off your score - bravo! :D

@Noodle9 In fact, I've spent more time than usual golfing it before posting a first version, so it's getting hard to shave a few more... :p

Python 3, 249 \$\cdots\$ 211 210 bytes
Saved 6 \$\cdots\$ 17 18 bytes thanks to Kevin Cruijssen!!!
def f(n):
 i=j=1
 t,y,e,w,s,x,S=[],n*'_','|',0,3*n+2,n*' ',n
 while s>1:t=[w*' '+s*'@']+t;s-=2*i;w+=i;i+=1
 while S>0:j+=1;t+=[x[S:]+S*'@'+e+x[1:]+'. '[S>j]+e+S*'@'];S-=j
 return t+[(x+e)*2]*(n-j+1)+[(y+e)*2+y]

Try it online!
Before golfing
def f(n):
    w=s=3*n+2
    t=[]
    i=1
    while s>1:
        t=[' '*((w-s)//2)+'@'*s]+t
        s-=2*i
        i+=1
    b=s=n
    i=2
    while s>0:
        t+=[(n-s)*' '+s*'@'+'|'+~-n*' '+'. '[s-i>0]+'|'+s*'@']
        s-=i
        b-=1
        i+=1
    while b:
        t+=[n*' '+'|'+n*' '+'|']
        b-=1
    t+=[n*'_'+'|'+n*'_'+'|'+n*'_']
    return t

Sorry, comments out of order now! My fault, I deleted while I double checked on TIO.

@ElPedro Are you sure? That's invalid syntax as it is but I can't see how it would work even if it were. w has to be incremented by i before i is incremented by 1.

I think you're right. My bad. It's been a long day.

@ElPedro np - thanks for trying! :-)

Have a +1 anyway :)

Change while s>1 to while~-s to save 1 byte.

Change [(y+e)*2+y] to [y*3+e*2] to save 2 bytes.

@mypetlion Unfortunately your suggestions don't work. s is being decremented by 2*i every loop (as i is incremented by 1 each loop) so it often never reaches 0. And   [y*3+e*2] doesn't draw the base.

I see that you're right. I was reading the code wrong.

The golfed code is mad - added before golfing code! :D

Charcoal, 78 71 bytes
Ｎθ≔×¹·⁵⊕θηＷ›ηⅈ«↑Ｐ×⁻ηⅈ@Ｍⅉ←»Ｊ⁰θ×θ_Ｐ×⊘⁺³θ_↑⊕θ⸿Ｗ›θⅈ«Ｐ×⁻θⅈ@Ｍ⁺²ⅉ¹»Ｊθⅉ↗‖ＯＯ﹪θ².

Try it online! Link is to verbose version of code. Explanation:
Ｎθ

Input n.
≔×¹·⁵⊕θη

Calculate the half width of the reference row.
Ｗ›ηⅈ«

While there is still canopy left to print, ...
↑

... move up a line, ...
Ｐ×⁻ηⅈ@

... print some canopy, ...
Ｍⅉ←»

... and move to the start of the next row of canopy.
Ｊ⁰θ

Jump to the left side of the base.
×θ_

Print the left side of the base.
Ｐ×⊘⁺³θ_

Print half of the middle of the base, allowing space for the trunk.
↑⊕θ

Print the trunk.
⸿

Move to the beginning of the reference row.
Ｗ›θⅈ«

While there is still foliage to print, ...
Ｐ×⁻θⅈ@

... print some foliage, ...
Ｍ⁺²ⅉ¹»

... and adjust the width of the foliage according to the number of lines of foliage already printed.
Ｊθⅉ↗

Move to the mirror location of the ..
‖ＯＯ﹪θ²

Reflect the half tree drawn so far to almost complete the tree and also move the cursor to the location of the ..
.

Complete the tree.

Java 11, 282 273 bytes
n->{String r="",y="_".repeat(n),e="|",N="\n",S=" ",q=S.repeat(n-1),z;int i=1,w=0,s=3*n+2;for(;s>1;s-=2*i,w+=i++)r=S.repeat(w)+"@".repeat(s)+N+r;for(i=1,s=n;s>0;s-=i)r+=S.repeat(n-s)+(z="@".repeat(s))+e+q+(s>++i?S:".")+e+z+N;return r+((q+=S+e)+q+N).repeat(n-i+1)+y+e+y+e+y;}

Port of @Noodle9's Python answer, after I helped him golf it a bit.
-9 bytes thanks to @Arnauld.
Try it online.
Explanation:
n->{                     // Method with integer parameter and String return-type
  String r="",           //  Result-String, starting empty
    y="_".repeat(n),     //  Temp-String `y`, consisting of the input amount of "_"
    e="|",               //  Temp-String `e`, containing "|"
    N="\n",              //  Temp-String `N`, containing a newline
    S=" ",               //  Temp-String `S`, contain a space
    q=S.repeat(n-1),     //  Temp-String `q`, consisting of the input-1 amount of spaces
    z;                   //  Temp-String `z`, uninitialized
  int i=1,               //  Integer `i`, starting at 1
    w=0,                 //  Integer `w`, starting at 0
    s=3*n+2;             //  Integer `s`, starting at 3 times the input + 2
  for(;s>1               //  Continue looping as long as `s` is larger than 1:
      ;                  //    After every iteration:
       s-=2*i,           //     Decrease `s` by `i` twice
       w+=i              //     Increase `w` by `i`
           ++)           //     And increase `i` by 1
     r=S.repeat(w)       //   Prepend `w` amount of spaces;
       +"@".repeat(s)    //   `s` amount of "@";
       +N                //   and a newline
         +r;             //   to the result-String
  for(i=1,               //  Reset `i` to 1
      s=n;               //  Reset `s` to the input
      s>0;               //  Continue looping as long as `s` is larger than 0:
      s-=i)              //    After every iteration: decrease `s` by `i`
    r+=                  //   Append the result-String with:
       S.repeat(n-s)     //    The input minus `s` amount of spaces;
       +(z="@".repeat(s))//    `s` amount of "@";
       +e                //    a "|";
       +q                //    the input-1 amount of spaces;
       +(s>++i?          //    If `s` is larger than `i+1`
                         //    (by first increasing `i` by 1 with `++i`)
          S              //     a space;
         :               //    Else:
          ".")           //     a ".";
       +e                //    a "|";
       +z                //    the input minus `s` amount of spaces again;
       +N;               //    and a newline character
  return r               //  After both loops: return the result-String,
          +              //  appended with:
           ((q+=S+e)     //   `q` with an additional space and "|" appended
                    +q   //   twice
                      +N)//   and a newline
           .repeat(n-i+1)//   Repeated `n-i+1` amount of times
          +y+e+y+e       //   As well as two times `y` and "|"
                  +y;}   //   And an additional third `y`

05AB1E, 106 105 103 99 97 95 93 92 bytes
$×0I>;úR©«D1s∍ILηOD¦<‚vyvDðyL<ǝ}r}r)ʒ1å}`'.I>ǝ)DJ0¢Iα®иIú0'_I×ì¬®¦∍«)˜IÉi.ºëº}»T„@|‡I≠i'.ð.;

Try it online or verify the first 10 test cases.
Explanation:
$                # Push 1 and the input-integer
 ×               # Pop both, and push a string consisting of the input amount of "1"s
  0              # Push a 0
   I>;           # Push the (input+1)/2
      ú          # Prepend that many spaces to the "0" (truncates decimals)
       R         # Reverse it so the spaces are trailing
        ©        # Store it in variable `®` (without popping)
         «       # Append it to the string of 1s
D                # Duplicate it
 1               # Push a 1
  s              # Swap the two values on the stack
   ∍             # Extend the "1" to a size equal to the string-length
    IL           # Push a list in the range [1, input]
      η          # Get the prefixes of this list
       O         # And sum each inner prefix
        D        # Duplicate this list of integer
         |       # Remove the leading 1
          <      # Decrease each value by 1
           ‚     # And pair the two lists together
v                # Loop over this pair of list of integers:
 yv              #  Inner loop `y` over each of those lists of integers:
   D             #   Duplicate the string at the top of the stack
     yL          #   Push a list in the range [1, `y`]
       <         #   Decrease it by 1 to make it [0, `y`)
    ð   ǝ        #   And replace the characters at those indices with a space
  }r             #  After the inner loop: reverse all values on the stack
}r               # After the outer loop: reverse all values on the stack
  )              # And wrap all values on the stack into a list
   ʒ             # Filter this list by:
    1å           #  Only keep lines which contain a "1"
   }`            # After the filter: Push all values separated to the stack again
     '.I>ǝ      '# Replace the space at index input+1 with a "."
          )      # And re-wrap all values on the stack into a list again
D                # Duplicate this list of lines
 J               # Join them all together
  0¢             # Count the amount of "0"s in this string
    Iα           # Get the absolute difference with the input
      ®и         # Repeat `®` (the "|" with trailing spaces) that many times as list
        Iú       # Prepend the input amount of spaces to each string
0                # Push a 0
 '_I×ì          '# Prepend the input amount of "_"
      ¬          # Push its first character (without popping), which is a "_"
       ®¦∍       # Repeat it the length of `®` - 1 amount of times
          «      # Append it to the "0" with leading "_"
)                # Wrap all values on the stack into a list again
 ˜               # Flatten it
  IÉi            # If the input is odd:
     .º          #  Mirror each line with the last character overlapping
    ë            # Else:
     º           #  Mirror each line without overlap
}»               # After the if-else: join all lines by newlines
  T              # Push 10
   „@|           # Push string "@|"
      ‡          # Transliterate all "1" to "@" and all "0" to "|"
  I≠i            # If the input is NOT 1:
     '.ð.;      '#  Replace the first "." with a space
                 # (after which the result is output implicitly)

r)ʒ1å}`'.I>ǝ)D could alternatively be )ʒþà}ć'.N>ǝšÂs for the same byte-count.

I'm not saying it is a bad solution but.... this is a very long 05AB1E solution xD

Good luck golfing it! Ping me when you do some progress with it :D

@RGS Golfed 14 bytes in total, so I'm fairly happy now. Can probably save a bit more bytes, but this will do for now. :)

Alright, you're in the 2 digits now! good job

@MagicOctopusUrn I was wondering whether the .c could be used so we won't have to deal with the space manually, but couldn't really figure it out unless I start from scratch again. Mostly because I currently use an approach that later on replaces prefixes with spaces at the vDðyL<ǝ} section of the code, which should be completely different in that case. As for the rest of your code, it's pretty unorthodox, but still not bad. :) You could try to finish it and post it as a separated answer?

@KevinCruijssen beat you by 8 bytes, surprisingly enough.

@MagicOctopusUrn Nice. Will see if I can see some parts that could be golfed in your answer.

@KevinCruijssen I'm 900% sure I could shave off 10 bytes if I were to only build half the tree then mirror... But I have no idea where to begin on that rewrite hah...

05AB1E, 86 81 77 67 bytes
Î×2.ø$×.ø©DSdJD.ΓN>·.$}`r[D¬≠#NÌF¦¨]\\0'..;R®1K¹;.D®TS'_:).c2Ý… @|‡

Try it online!
-5 -9 -19 @ Kevin Cruijssen, thanks!

This is some unorthodox stuff, definitely not my best answer... It's been awhile, I'm rusty.
Also tried to use some of the new commands like Δ which did not go as planned, and I had to use a global register. Still trying to golf that whole part out.

For the purpose of the explanation I will mean input for the duration.
[       Code      ] #     [        Explanation        ]
====================#========================================
$                   # Push 1 and I.
 3*Ì                # (3 * I) + 2
    ×               # "1" repeat (3 * I) + 2 times.
     Ð              # Triplicate.

====================# Setting up the first line of the bottom crown.
¹x                  # Push I and 2I.
  ‚                 # [I, 2I]
   >                # [I + 1, 2I + 1]
    o               # [2 ^ (I + 1), 2 ^ (2I + 1)]
     ¥              # 2 ^ (I + 1) - 2 ^ (2I + 1)
      b             # Convert to binary (I=2: 11000)
       -            # Subtract from previous value (I=2: 11111111-11000=11100111)
        н           # Remove from array (get first element)

====================# Setting up the first line of the bottom crown.
¹                   # Push I.
 x>‚                # [I, 2I + 1)
    o               # [2 ^ I, 2 ^ (2I + 1)]
     b              # Convert to binary (I=2: [100,100000])
      O             # Sum (I=2: 100100)
       +            # Add to previous (I=2: 11200211)
        ©ˆ          # Store in register, push to global array.

====================# Setting up the first line of the top crown.
ˆ                   # Push the line of 1's that starts the top crown.

====================# Creating the top crown.
Δ                   # Until this code stops changing the value...
 N>·                # (Iteration + 1) * 2
    .$              # Remove (Iteration + 1) * 2 characters
      Dˆ            # Dupe and push to global array.
        }¯R`        # Push global array reversed, flatten.

====================# Creating the bottom crown.
[                   # Infinite loop...
 D¬≠#               # Duplicate last value, break if it doesn't start with 1.
     NÌ             # (2 * Iteration) + 1
       F¦¨          # Loop (2 * Iteration) + 1 time and remove head/tail.
          ]\\       # End loop, remove 2 values.

====================# Adding the knot of the tree.
0'..;               # Find and replace first 0 with a period.
     R              # Reverse it from the left side to the right.

====================# Creating the trunk.
®                   # Push the register.
 1K                 # Remove the extra leaves (1's).
   ¹;.D             # Push I/2 copies of this.

====================# Creating the ground.
®                   # Push register for bottom
 TS'_:              # Replace all leaves (1's) and spaces (0's) with '_' (3's)

====================# Pulling it all together.
)                   # Wrap stack to array.
 .c                 # Center.
   2Ý               # Push [0,1,2].
     … @|           # Push " @|".
         ‡          # Replace 0 with ' ', 1 with '@' and 2 with '|'.

====================# Done!

working on updating the explanation, I am on my cell phone at the moment.

2* can be ·; you can remove the ´ (since you don't use the global array later on anymore, so no need to empty it); 2N+ can be NÌ; you can remove the } before the ]; You can remove the R at the \\R0, since it's a palindrome anyway; and you can remove the J after the 2Ý, since the transliterate also works with lists.

How have I never known about ·...?

You forgot to remove the } before the ] in your actual code/TIO. And what you were trying with Δ was probably .Γ instead. You can use r.ΓN>·.$}`r[ instead of ˆˆΔN>·.$Dˆ}¯R`[ for -3: try it online.

@KevinCruijssen only way I'm gonna pull less than 71 is if I get the 12021 pattern made in better than $3*Ì×Ð¹x‚>o¥b-н¹x>‚obO+© I think I can I just a not seeing it.

67 bytes in that case by replacing that part you mentioned (including the r after ©) with Î×2.ø$×.ø©DSdJD. ;) Hadn't realized that first part was only for the 12021 pattern.

@KevinCruijssen lmao, right? It was such a convoluted way to do it, that's so much simpler. I got myself into thinking it was the only way. Dunno how I missed that. Surround with was one of my first ideas but I went with the binary randomness heh.

Perl 5, 215 bytes
$n=pop;$y=$n*3+2;while($y>0){$_=$"x$x.'@'x$y.$/.$_;$x+=++$z;$y-=2*$z}print;$i=$x=$n++;$k=2;while($n--){$_=$"x$j.'@'x$i.'|'.$"x$x.'|'.'@'x$i.$"x$j;$k>=$i?($i&&s/ \|@/.|@/,$i=0,$j=$x):($i-=$k,$j+=$k++);$n||y/ /_/;say}

Try it online!
Takes size of tree as single command-line argument.
I'm sure it can probably be improved.
Ungolfed:
$n = pop;                                   # get tree size from command line

## Crown section ##

$x = 0;                                     # initial number of leading spaces to print
$y = $n * 3 + 2;                            # initial number of @s to print
$z = 0;                                     # used for increment/decrement value

while($y > 0)                               # build from bottom up as long as we have @s to add
{
        $_ = ' 'x$x . '@'x$y . "\n" . $_;   # new row of crown, prepended to existing crown
        $z++;                               # increase increment/decrement counter
        $x += $z;                           # increase leading spaces for next row
        $y -= 2*$z;                         # decrease number of @s for next row
}

print;                                      # print the crown (don't use say to avoid extra LF)

## Trunk section ##

$x = $n++;                                  # width of trunk
$i = $x;                                    # number of @s before/after trunk
$j = 0;                                     # number of leading/trailing spaces
$k = 2;                                     # number of leading/trailing @s to remove in next row

while($n--)                                 # build each row of the trunk
{
        $_ = ' 'x$j . '@'x$i . '|' . ' 'x$x
           . '|' . '@'x$i . ' 'x$j;         # new row of trunk

        if($k >= $i) {                      # if next row won't have any @s
                s/ \|@/.|@/ if($i);         # set dot in trunk for last row with any @s
                $i=0;                       # no @s in next row
                $j=$x;                      # spaces in next row equal to trunk width
        }
        else {
                $i -= $k;                   # reduce @s for next row
                $j += $k;                   # increase spaces for next row
                $k++;                       # increase increment/decrement counter
        }

        if($n == 0) {                       # if this is the last row
                y/ /_/;                     # replace spaces with underscores
        }

        say;                                # print the row
}