P27783 [洛谷] Last Three Digits of a Power
普及-
题目描述

Problem Description

What are the last three digits of the power \(a^b\)?

Input Format

Two positive integers \(a\) and \(b\). \(1 \le a \le 100\), \(1 \le b \le 10000\).

Output Format

Output the last three digits of the power from highest to lowest, without any separators. If the power has fewer than three digits, pad with zeros in the front.

Sample Input and Output

Sample Input #1

2 3

Sample Output #1

008

Sample Input #2

7 2011

Sample Output #2

743
输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
2 3
样例输出
008