1931. Painting a Grid With Three Different Colors
Last updated
Last updated
**Input:** m = 1, n = 1
**Output:** 3
**Explanation:** The three possible colorings are shown in the image above.**Input:** m = 1, n = 2
**Output:** 6
**Explanation:** The six possible colorings are shown in the image above.**Input:** m = 5, n = 5
**Output:** 580986