<\/span><\/h2>\n\n\n\nThe 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?” \u2014 the HR manager thought. “Just raise number 5 to the power of n<\/em> and get last two digits of the number. Yes, of course, n<\/em> 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.”<\/p>\n\n\n\nCould you pass the interview in the machine vision company in IT City?<\/p>\n\n\n\n
<\/div>\n\n\n\n
Input<\/strong><\/p>\n\n\n\nThe only line of the input contains a single integer\u00a0n<\/em>\u00a0(2\u2009\u2264\u2009n<\/em>\u2009\u2264\u20092\u00b71018<\/sup>) \u2014 the power in which you need to raise number\u00a05.<\/p>\n\n\n\n<\/div>\n\n\n\n
Output<\/strong><\/p>\n\n\n\nOutput the last two digits of\u00a05n<\/em><\/sup>\u00a0without spaces between them.<\/p>\n\n\n\n<\/div>\n\n\n\n
Examples<\/strong><\/p>\n\n\n\nInput<\/td> | 2<\/td><\/tr> |
Output<\/td> | 25<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<\/div>\n\n\n\n
\n\n\n\n <\/span>Solution<\/strong><\/span><\/h2>\n\n\n\nWhen we observe the powers of 5 from 0 to 10, we can see:<\/p>\n\n\n\n 50<\/sup> = 1 51<\/sup> = 5 52<\/sup> = 25<\/strong> 53<\/sup> = 125<\/strong> 54<\/sup> = 625<\/strong> 55<\/sup> = 3125<\/strong> 56<\/sup> = 15625<\/strong> 57<\/sup> = 78125<\/strong> 58<\/sup> = 390625<\/strong> 59<\/sup> = 1953125<\/strong> 510 <\/sup>= 9765625<\/strong><\/p>\n\n\n\nWhen 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.<\/p>\n\n\n\n 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.<\/p>\n\n\n\n <\/div>\n\n\n\n <\/span>C# Solution<\/strong><\/span><\/h3>\n\n\n\nSolution1<\/strong><\/p>\n\n\n\nConsole.WriteLine(25);<\/code><\/pre><\/div>\n\n\n\n<\/div>\n\n\n\n <\/span>Java Solution<\/strong><\/span><\/h3>\n\n\n\nSolution1<\/strong><\/p>\n\n\n\npublic class Main {\n public static void main(String[] args) {\n System.out.println(25);\n }\n}<\/code><\/pre><\/div>\n\n\n\n
|