I have been trying this problem using C++, but have been unable to solve it. I tried doing in Python and it did fine in my Linux Machine (GCC-Compiler), but when I submit it here, its shows me run-time error. Where am I going wrong?
The Code:
a = int(input()) b = int(input()) ans = (a ** b) — (b ** a) print((ans))