a highly useful c++ code to calculate ncr mod m where m=10^9 using Euler's theorem