CodeLab Academy 📞 9936 6696
← List Python · Level 10: Algorithms Code · 100 points ← #930 #932 →

#931. Fast power (mod 1000000007)

You get a and b (b can be very big). Find aᵇ mod 1000000007 using fast exponentiation. ### Input One line: a b (0 ≤ a ≤ 10⁹, 0 ≤ b ≤ 10¹⁸). ### Output A number.

Examples

Input
762802240 628885637221248456
Output
480245434
Input
921124483 390916060194002895
Output
853161500

💡 You can solve it with Python, JavaScript or blocks. Read the input line by line with input(). Don't print a question (like input("Number: ")). Print exactly what the output asks for, nothing more.

🔒 You can solve the first 3 problems without an account. Sign up for free to solve this one!