Codeforces 630A Again Twenty Five! Solution & Explanation

Difficulty : 800

Problem Description

The HR manager was disappointed again. The last applicant failed the interview the same way as 24 previous ones. “Do I give such a hard task?” — the HR manager thought. “Just raise number 5 to the power of n and get last two digits of the number. Yes, of course, n can be rather big, and one cannot find the power using a calculator, but we need people who are able to think, not just follow the instructions.”

Could you pass the interview in the machine vision company in IT City?

Input

The only line of the input contains a single integer n (2 ≤ n ≤ 2·1018) — the power in which you need to raise number 5.

Output

Output the last two digits of 5n without spaces between them.

Examples

Input2
Output25

Solution

When we observe the powers of 5 from 0 to 10, we can see:

50 = 1
51 = 5
52 = 25
53 = 125
54 = 625
55 = 3125
56 = 15625
57 = 78125
58 = 390625
59 = 1953125
510 = 9765625

When n is greater than or equal to 2, regardless of the value of n, the last two digits of 5 raised to the power of n will always be 25. This is because each multiplication of 5’s power ends with 5, and when n is greater than or equal to 2, there are at least two 5s being multiplied together, resulting in the number necessarily ending with 25.

And in the problem description, the given power of 5 is equal to or greater than two, so we can print 25 without any doubt.

C# Solution

Solution1

Console.WriteLine(25);

Java Solution

Solution1

public class Main {
    public static void main(String[] args) {
        System.out.println(25);
    }
}
Klook.com

Conclusion

Rather than testing programming skills, it feels like this question tests observation skills more.

This is also highly significant in practical scenarios.

🧡If my solution helps, that is my honor!

🧡You can support me by sharing my posts, thanks you~~

✅If you got any problem about the explanation or you need other programming language solution, please feel free to let me know !!

The problem link : Problem – 630A – Codeforces

Random Codeforces Posts

Leave a Reply

Your email address will not be published. Required fields are marked *