Calculate the Power
Practice
3.7 (54 votes)
Algorithms
Approved
Easy
Open
Problem
91% Success 41927 Attempts 20 Points 1s Time Limit 256MB Memory 1024 KB Max Code

Given two number A and B. Calculate the value of AB. Output may be too large so print the answer modulo 10^9+7.

Input:
Input contains two integers A and B separated by space.

Output:
Print value of AB modulo 10^9+7.

Constraints:
Test File 1 to 5:
1<=A<=10
1<=B<=10

Test File 6 to 10:
1<=A<=106
1<=B<=1010

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Please wait while we load the editor

Loading...
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:20
32 votes
Tags:
ApprovedCombinatoricsEasyImplementationMathOpen
Points:20
56 votes
Tags:
Ad-HocAlgorithmsApprovedEasyOpen
Points:20
187 votes
Tags:
ApprovedEasyMathNumber TheoryOpen