0
cout<<((n%mod*n%mod)%mod)

when the value of n is:

2248813659738258

my output is :

-840739582

However this problem is resolved when using 'printf' instead of cout the reason for this problem??.

Ryednap
  • 324
  • 1
  • 9

0 Answers0