i agree with @dhruvsinghal. I understood the problem only after reading comments from the contest page
1 Like
Used FOr Loop For Power Calculation and it Worked For all
for(ll i=1;i<=bounds.second-bounds.first;i++)
{
ans=(ans*2)%MOD;
}