# LaTeX真理値表

というラベルを付ける必要があります。入力のリストの長さは常に `2 ^ 25`
よりも短くなります。つまり、入力の数は常に25より少なくなるため、入力名にアルファベットの小文字の文字を使用できます。

## 入力

A number `n` of 入力s and list of length
`2^n` of binary numbers which represents the 出力s of a
logical function.

## 出力

LaTeX code that produces the truth table for that function. 入力
and 出力 values should be centered in rows. There must be a line
between table header and its values and between 入力s and 出力, so the
code should be similar to that below.

``````begin{tabular}{c * |c}
<������������������������``````

## �

``````2
[0, 0, 0, 1]
``````

``````begin{tabular}{cc|c}
a & b & F \
hline
0 & 0 & 0 \
0 & 1 & 0 \
1 & 0 & 0 \
1 & 1 & 1 \
end{tabular}
``````

LaTeXに表示されたときに次の真理値表が表示されます

ベストアンサー

# Charcoal, 70 bytes

``````≔tabularζζ{*θc|c}⸿⪫✂β⁰Ｉθ¹&⁰&F\⸿hline⸿Ｅη⁺⪫⁺⮌ＥＩθＩ﹪÷κＸ²λ²⟦ι⟧&¦\⁰endζ
``````

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

``````≔tabularζ
``````

``````ζ{*θc|c}⸿
``````

`q` の値）を印刷します。

``````⪫✂β⁰Ｉθ¹&⁰&F\⸿hline⸿
``````

Get the first `q` letters from the predefined
variable `b` and insert `&`s between them,
then append the `&F\` and also print
`hline` on the next line.

``````Ｅη⁺⪫⁺⮌ＥＩθＩ﹪÷κＸ²λ²⟦ι⟧&¦\
``````

Loop over the characters in the second input. For each one, its
index is converted to binary with length `q`, the
character is concatenated, the result is joined with
`&`s and `\` is appended. The resulting
strings are implicitly printed on separate lines.

``````⁰endζ
``````

` endtabular` を印刷します。 （ `|`
は、コードを挿入するための省略記号としての単なるセパレータです）。