I unlocked the test cases and checked the first one, and my answer was correct. Please tell why then is the submission showing 1 ans wrong?
Wrong Answer in Test Case 0
Hi @Doctor_Insult
Test case number is not in the same order as they are shown when you submit the code. Try other test cases also you will get one of them as wrong output.
56789 3452 100000 this is the test case I got wrong. My answer comes out to be about 20000 off the correct ans. Can you plz tell why it is giving wrong answer?
@Doctor_Insult
Change data type of all variable from int to long long then all test cases of your code will pass because when you are using int and calculating a^b then it is going out of range of int that is why it is showing wrong ans for this test case.
Here is your corrected code 