Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/funksiya-darajaga-oshirish

Raising to a power

Easy 1000 ms 128 MB 26%
Share

Write a function Power(a, k) that returns the $k$-th power of the integer $a$, that is $a^{k}$ ($a^{0} = 1$).

Example 1: Power(2, 10) → 1024

Example 2: Power(-3, 3) → -27

Write only the function body.

The number a is multiplied k times, the function returns the result

Input

One line with an integer $a$ and a non-negative integer $k$ — the arguments of the function.

Output

The value returned by the function: an integer.

Note

$-10 \le a \le 10$
$0 \le k \le 15$

Examples

Input #1
2 10
Output #1
1024
Input #2
-3 3
Output #2
-27

Sign in to submit a solution

Signing up is free and takes a minute.