#t305. 涂色问题
涂色问题
Coloring Problem
Problem Background
Special for beginners, ^_^
Problem Description
This is a coloring problem. There is now a grid with 3 rows and columns. You need to color the grid using 3 colors, ensuring that adjacent cells have different colors. How many coloring schemes are there in total? Output the answer modulo .
Input Format
One positive integer ().
Output Format
One integer: the number of coloring schemes.
Sample Input 1
1
Sample Output 1
12
Sample Input 2
2
Sample Output 2
54
Constraints
1s, 1024KiB for each test case.