The HR manager was disappointed again. The last applicant failed the interview the same…
- User
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
Input
2
Output
25
Assistant
We need to compute last two digits of 5^n, for n >= 2 up to 2e18. Let's examine pattern:
5^1 = 5 -> last two digits: 05? Actually it's just 5, but usually we need two digits without spaces, so for n>=2 we always get something ending with 25? Let's check:
5^2 = 25 -> last two digits 25 5^3 = 125 -> last two digits 25 5^4 = 625 -> last two digits 25 5^5 = 3125 -> 25 Indeed for n>=2, 5^n ends with 25. Because 5^2 = 25, and then each subsequent multiplication by 5 adds a factor of 5, but 255 = 125 -> last two digits 25; 1255 = 625 -> 25, etc. In fact, for any n>=2, 5^n mod 100 = 25. Let's verify: 5^2 mod 100 = 25. Then 5^n mod 100 for n>2: 5^n = 5^{n-1} * 5. If 5^{n-1} mod 100 = 25, then (25*5) mod 100 = 125 mod 100 = 25. So by induction, holds for all n>=2. However, does it hold for n=0 or n=1? For n=1, 5 mod 100 = 5, but the problem says n>=2. So the answer is always "25". But wait, is there any case where n is extremely large that could break? No, because pattern is fixed. So the output is always 25.
Double-check: 5^10 = 9765625, last two digits 25. Yes.
Thus for any n >= 2, answer is 25.
But is there any trick? Possibly they want "25" as output always. Let's check sample: Input 2 => Output 25. So that matches.
Thus answer is trivial: print "25". But wait, condition says n (2 ≤ n ≤ 2·10^18). So indeed it's always 25. So solution is O(1).
But is there any other nuance? Possibly if n=0? Not in range. So okay.
Thus the answer: just output "25".
But the problem statement might be intentionally tricky: They think it's a hard task but it's not. Or maybe there is nuance: "raise number 5 to the power of n and get last two digits of the number." Yes.
Thus I'll implement: read n, ignore it, print "25". But ensure that output has two digits, no spaces. For n=2, output is 25. Good.
We could also implement modular exponent, but it's unnecessary.
Check if there is any possibility that 5^n mod 100 = something else for large n? Let's compute mod 100: phi(100)=40, but 5 and 100 not coprime (since gcd(5,100)=5), so Euler's theorem doesn't apply directly. But as observed, 5^2 mod 100 = 25, and 5^3 = 125 mod 100 = 25, so 5^k mod 100 = 25 for all k>=2. Because 255 =125, but 125 mod 100 =25, indeed 255 mod 100 = 125 mod 100 = 25. So once you get 25, multiplying by 5 yields 125 which ends 25. So cycle length 1 after reaching 25.
Thus answer is always 25.
Therefore solution.
Implementation in Python:
def solve(): import sys n = int(sys.stdin.readline().strip()) # no need to use n except maybe to check n==1? but n>=2 sys.stdout.write("25")
if name == "main": solve()
Will pass.
But the problem is from Codeforces? Likely CF 630A "Again Twenty Five!". Yes, that's a known problem. So answer is just 25.
Thus done. ```python
import sys
def main() -> None: # Read the integer n (unused, but we need to read input) n = sys.stdin.readline().strip() # For any n >= 2, the last two digits are always "25" sys.stdout.write("25")
if name == "main": main()