Rhezo and Big Powers

3.6

261 votes
Approved, Easy, Math, Number Theory, Ready
Problem

Rhezo likes numbers of the form AB. But computing AB, for any 2 numbers A and B is a hard task for him. He would like you to help him out in this.

Input:
First line of input contains a single integer A. Second line contains the integer B.

Output:
Help Rhezo find AB. As this number can be large, print it modulo 109+7.

Constraints:

  • 1A109
  • 1B10105
Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?