How many infinite sequences a1, a2, ... consisting of {{1, ... ,n}} satisfy the following conditions?
Find the count modulo 109+7.
Input is given from Standard Input in the following format:
n
Print how many sequences satisfy the conditions, modulo 109+7.
2
4
The four sequences that satisfy the conditions are:
654321
968545283
Subtask | Score |
---|---|
1 | 100 |
2 | 0 |