MeetCode
Count Functions
C
C++
Computer Mathematics
CSS
DSA
HTML
Java
JavaScript
NodeJS
PHP
Programming Interview
Python
ReactJS
SQL
Run
Submit
Dark
Problem Statement
Solutions
Submissions
Count Functions
Medium
Computer Mathematics
Sets, Relations & Functions
26 views
Explanation
Complexity
Problem Statement
How many functions from set of size n to set of size m?
Input Format
Two integers n m.
Output Format
One integer (may be huge, output as power form).
Example
Input
3 2
Output
2^3
Constraints
n,m
Input / Output Format
Input Format
Two integers n m.
Output Format
One integer (may be huge, output as power form).
Constraints
n,m
Examples
Input:
3 2
Output:
2^3
Example Solution (Public)
Computer Mathematics
Each of n elements chooses one of m values, so m^n. Output as text m^n if large.
Official Solution Code
Wrap
Copy
Each of n elements chooses one of m values, so m^n. Output as text m^n if large.
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 2
Expected Output
2^3
Compile Output
Error
Output
Please
login
to submit solutions.