012. Easy Exponentials
012. Easy Exponentials
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output
In the last contest, you were asked to find the last digit of a very large number. This time, you are asked to find the entirety of a much smaller number: your task is to find the first number taken to the power of second number. A brute force approach does work here.
Input
The only line of input contains two space-separated integers n and k, 1 <= n, k <= 10.
Output
Output a single integer: the number .
Example
input
Copy
3 5
output
Copy
243
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p,q=map(int,input().split()) | |
print(p**q) |
Comments
Post a Comment
Please give us your valuable feedback