Calculate the Power
Practice
3.7 (54 votes)
Algorithms
Approved
Easy
Open
Problem
91% Success 41945 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
Submissions
Please login to view your submissions
Similar Problems
Points:20
16 votes
Tags:
Basic Number Theory-1AlgorithmsNumber TheorySieveArraysMath
2.Help Oz
Points:20
117 votes
Tags:
ApprovedEasyMathNumber TheoryOpen
Points:20
187 votes
Tags:
ApprovedEasyMathNumber TheoryOpen
Editorial