#K71542. Checkerboard Grid Painting
Checkerboard Grid Painting
Checkerboard Grid Painting
Given an even integer \( N \) representing the size of a grid (i.e., an \( N \times N \) grid), your task is to determine the number of valid ways to paint the grid using a checkerboard pattern. There are only two valid configurations:
\(1\) A checkerboard pattern starting with a black cell at the top-left corner.
\(2\) A checkerboard pattern starting with a white cell at the top-left corner.
Thus, regardless of the value of \( N \) (as long as it is even), the answer is always \(2\) modulo \(10^9+7\). All inputs will be even numbers.
inputFormat
The input consists of a single even integer ( N ) ((2 \le N \le 10^5)) provided via standard input. This integer represents the dimensions of an ( N \times N ) grid.
outputFormat
Output a single integer representing the number of valid ways to paint the grid (i.e., 2) modulo (10^9+7), printed to standard output.## sample
2
2
</p>