#K37062. Count Valid Passwords
Count Valid Passwords
Count Valid Passwords
You are given an integer m representing the length of a password. A valid password satisfies the following conditions:
- It is composed only of lowercase English letters.
- No two adjacent characters are the same.
The total number of valid passwords of length m is given by the formula:
$$26 \times 25^{m-1}$$where the first character can be chosen in 26 ways and each subsequent character in 25 ways (all letters except the one immediately preceding it).
inputFormat
The input consists of a single integer m (1 \leq m \leq 20
) given on a single line.
outputFormat
Output a single number which is the total count of valid passwords of length m according to the given rules.
## sample1
26