|
|||
DictionaryWe wish to create a dictionary of artificial words. The words have to fulfill the following criteria:
Examples and counterexamples for length n = 12:
The following examples of length 12 are words: The following examples of length 12 are not words:
The dictionary must contain all words of a given length n. For a given natural number n, calculate the number of words that will be written in the dictionary. Input SpecificationThe input consists of a single line containing a single value of the natural number n (1 ≤ n ≤ 263). Output SpecificationOutput a single line containing the number obtained as the remainder after dividing the number of words of length n by 1 000 000 007. Sample Input 1
Output for Sample Input 1
Sample Input 2
Output for Sample Input 2
Sample Input 3
Output for Sample Input 3
ExplanationIn Sample 1, we have the following 24 words:
In Sample 2, the number of words of length 46 is 1 317 046 908, and the remainder of the division by 1 000 000 007 is 317 046 901. |
|||
University of Debrecen; Faculty of Informatics; v. 09/30/2024 |