CT21461

Tomas's Modular Power Ledger

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

It is audit day at the observatory of Starfall. Tomas spreads the counterweights records across the table and picks up a sharp pencil. Task: Read a and b and print a^b modulo 1000000007. Input format: One line with two space-separated integers a and b. Output format: Print a^b mod 1000000007. Constraints: 0 <= a,b <= 1000000000000000000.

Example 1:

Input: 689613217561054456 623963129643256668
Output: 207200540

Example 2:

Input: 61927766461150374 779735869766382235
Output: 765494652

Example 3:

Input: 503017227492829743 351682773214225667
Output: 456737109

Constraints:

0 <= a,b <= 1000000000000000000.

Loading...
Test Cases:No test cases
No test cases available.