A. Again Twenty Five!
time limit per test
0.5 seconds
memory limit per test
64 megabytes
input
standard input
output
standard outputThe 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, ncan 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
思路:n>=2,后两位都是25,所以只需要输出25就可以了,我才不会告诉你,我是看完所有测试数据后才发现的。没办法,数学是硬伤
#!/usr/bin/python
# -*-coding:utf-8 -*-
n=raw_input()
print '25'
本文介绍了一个面试题,要求计算5的任意大整数次幂后的最后两位数。提供了简洁的思路和Python代码解决方案,展示了如何通过数学思考而非直接计算来解决此类问题。
416

被折叠的 条评论
为什么被折叠?



