MeetCode
Truth Table Count
C
C++
Computer Mathematics
CSS
DSA
HTML
Java
JavaScript
NodeJS
PHP
Programming Interview
Python
ReactJS
SQL
Run
Submit
Dark
Problem Statement
Solutions
Submissions
Truth Table Count
Easy
Computer Mathematics
Boolean Algebra & Logic
26 views
Explanation
Complexity
Problem Statement
How many rows in truth table for n boolean variables?
Input Format
One integer n.
Output Format
One integer.
Example
Input
3
Output
8
Constraints
0
Input / Output Format
Input Format
One integer n.
Output Format
One integer.
Constraints
0
Examples
Input:
3
Output:
8
Example Solution (Public)
Computer Mathematics
Rows = 2^n.
Official Solution Code
Wrap
Copy
Rows = 2^n.
Please
login
to submit solutions.
Editor
C
C++
Computer Mathematics
CSS
DSA
HTML
Java
JavaScript
NodeJS
PHP
Programming Interview
Python
ReactJS
SQL
Test Cases
Output
Submission Result
Input
3
Expected Output
8
Compile Output
Error
Output
Please
login
to submit solutions.