#P10414. Modular Exponent Tower

    ID: 12424 Type: Default 1000ms 256MiB

Modular Exponent Tower

Modular Exponent Tower

Compute the value of the exponent tower 2(3(4(…^(2023)))) modulo 2023.

The expression can be written as:

$$2^{\left(3^{\left(4^{\left(\cdots ^{2023}\right)}\right)}\right)} \bmod 2023$$

This is a fill-in-the-blank problem. You only need to compute the final integer result and output it. Any extra output will be considered incorrect.

Note: The exponentiation in the above expression is right‐associative, meaning it is evaluated from the top down. In many programming languages, the operator ** denotes exponentiation. For example, the expression can also be written as 2 ** (3 ** (4 ** ( ... 2023 ... ))).

inputFormat

This problem does not require any input.

The answer is fixed and must be computed exactly as specified.

outputFormat

Output a single integer: the value of 2(3(4(…^(2023)))) mod 2023.

sample

dummy
869