I am facing a problem with that question. It is working properly when I execute in code block ide nut when I submit that code on code forces then it is showing an error on test case 5. If Anyone knows what is with my code please tell me
include
include<math.h>
using namespace std; int main() {
int a,b,ans; cin>>a>>b;
cout<<pow(a,b)-pow(b,a);
} that is my code
Send problem link, constraints on a and b are important.
Also pow is notoriously imprecise when working with integers
https://codeforces.me/problemsets/acmsguru/problem/99999/112
Constraints say a,b <= 100. For a = 2 and b = 100 for example, the result will be in the order of 10^30, and that doesnt fit any integer type. You will need some sort of big int (arbitrarily large integers) implementation to pass this problem. Search for big int if you really want to do it
use Python :p
Arpa BigInt for C++