#K76262. Mixed Homogeneous Sequences
Mixed Homogeneous Sequences
Mixed Homogeneous Sequences
You are given two integers \( N \) and \( M \). Your task is to determine the number of different Mixed Homogeneous Sequences modulo \( 10^9+7 \).
A Mixed Homogeneous Sequence is defined as follows: regardless of whether \( N \) is even or odd, the number of sequences is computed as \( M^2 \). In other words, for each position in the sequence, there are \( M \) options and therefore the final answer is \( M^2 \) modulo \( 10^9+7 \).
Compute the result and output the value.
inputFormat
The input consists of a single line containing two space-separated integers: \( N \) and \( M \), where \( N \) represents the length of the sequence and \( M \) represents the number of possible values at each position.
outputFormat
Output a single integer, the number of different Mixed Homogeneous Sequences modulo \( 10^9+7 \).
## sample2 3
9