All test cases passed except 1


plz check the code,1 test case not passing

hi @aatish08, at line 12, it should be int y=modex(a,n/2,b)%b; u did’nt take the mod

i did the modification but 1 test case is still not passing,plz check

hi since value can be large so you have to declare your return type as long long
here , i have corrected your code :https://ide.codingblocks.com/s/229605

1 Like

thanks, for the help,all test cases passed


Can you plz check this code for deepak and primes question,not getting appropriate response on the doubt.
this is giving segmentation fault.

@aatish08 , raise a doubt on the following question , so i or any other TA can easily debug your answer

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.