P7053 [NWRRC 2015] Fygon
Description
Frederick is a young programmer. He participates in all programming contests he can find and always uses his favorite programming language Fygon. Unfortunately, he often receives Time Limit Exceeded outcome, even when his algorithm is asymptotically optimal. That's because the Fygon interpreter is very slow. Nevertheless, Frederick likes Fygon so much, that he uses non-asymptotical optimizations to fit the solution into time limit. To make it easier, he asks you to write a program, which will be able to estimate the exact number of operations that his Fygon program makes.
For simplicity, we will assume that Fygon has only two statements. The first statement is lag. It substitutes almost any other statement. The second statement is a for loop:
for in range $():$
This means that iterates over values from $0$ to $−1$ . In Fygon is a lowercase letter from a to $z$ , and is either already defined or a positive integer constant. The of the loop is indented by four spaces and contains at least one statement.
The program receives the input in the variable $n$ . This variable has special meaning and cannot be used as a loop variable.
Your task is to find the formula that calculates the number of performed lag operations by the given Fygon program, depending on the value of the variable $n$ .
Input Format
N/A
Output Format
N/A
Explanation/Hint
Time limit: 2 s, Memory limit: 256 MB.