Cruel Math Teacher

Time limit1sMemory limit128 MB

Summary
Compute N raised to the power P exactly, then print the result with 70 digits per line and no leading zeros.
Level

Medium4 of 10

Topics
Math, Implementation, Array
Solved
No attempts yet

Problem

Bessie has returned to 8th grade to finish her diploma. Her cruel math teacher makes the students compute "powers of integers". The PP-th power of an integer NN is the value obtained by multiplying NN by itself PP times, written NPN^P.

For example, 23=2×2×2=82^3 = 2 \times 2 \times 2 = 8.

Write a program that computes NPN^P. The answer is guaranteed to have at most 15,00015{,}000 digits. Print the answer 7070 digits per line; only the last line may be shorter. Do not print any leading zeros.

Input

  • Line 1: Two space-separated integers NN and PP (1≤N≤2,000,000,0001 \le N \le 2{,}000{,}000{,}000, 1≤P≤100,0001 \le P \le 100{,}000).

Output

  • Print the value of NPN^P, 7070 digits per line (the last line may be shorter). Do not print leading zeros.

Examples5

  1. Example 1

    Input
    2 15
    
    Expected output
    32768
    
  2. Example 2

    Input
    1 1
    
    Expected output
    1
    
  3. Example 3

    Input
    10 5
    
    Expected output
    100000
    
  4. Example 4

    Input
    2 100
    
    Expected output
    1267650600228229401496703205376
    
  5. Example 5

    Input
    123456 88
    
    Expected output
    1129987770413559019467963153621658978635389622595924947762339599136126
    3387265547320084192414348663697499847610072677686227073640285420809119
    1376617325522768826696494392126983220396307144829544079751988205731569
    1498433718478969549886325738202371569900214092289842856905719188890170
    0772424218248094640290736200969188059104939824466416330655204270246371
    3699112106518584413775333247720509274637795508338904731884172716714194
    40898407102819460020873199616