I was solving this question  Problem  B  Codeforces
The idea was to calculate 3^(3n)  7^n mod M.
*here % is used in terms of C++

Now what I understand from c  What's the difference between “mod” and “remainder”?  Stack Overflow, is that 10%3 is 1 while 10 mod 3 is 2. mod and %(the remainder in C/C++) is same for positive numbers. Is this correct?

When a question asks us to give the answer modulo 10e9 + 7, as in the abovementioned question, is it asking about remainder or modulo?  as this Submission #120181564  Codeforces submission failed while this Submission #120182114  Codeforces passed. I used the idea from Modulo of Negative Numbers ( I believe this is applicable to modulo and not remainder so “modulo 10e9 +7” is talking about “mod”  which is obvious but I am so confused). If Yes, then can someone explained the “modulo twice” method in the above link?
Thanks in Advance for all the help.