SOME TEST CASES SHOWING WRONG AND SOME RIGHT

#include
using namespace std;

int Calculate(long long int a,long long int b,long long int c)
{
return ((a%c)*(b%c))%c;
}

int main() {

long long int a,b,c;
cin>>a>>b>>c;

cout<<Calculate(a,b,c);
return 0;

}

@Mukul-Shane-1247687648773500,
u r doing multiplication but its says a power b mod c
and use fast exponentiation else test case may fail.

for implementation diff refer : https://ide.codingblocks.com/s/656948

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.