Well my following code is accepted but i have a doubt.When i try to submit it using #define and not by declaring “mod”(refer code) as a variable,it is giving a compilation error.Why is it so?Please help.
dont put a semi-colon after the define statement…i.e. define like this:-
#define MOD 1000000007
hope this helps…
Preprocessor would replace
and you can see it is invalid.
Preprocessor directives are delimited by line breaks and not semi-colons.
thnx kunal361 and bugkiller
If you’re done with this question, hit green tick on any answer and then close the question.