What's run error? in this Question

What is wrong in my code??
It is giving run error for this testcase on submission.
1000004 10000040000000000000000000

But when I compile and test I get the correct answer

here is my code.

problem is a part of competitive programming, number theory challenge.