In this screenshot of the video can you tell why we have written ll denom= 1ll in line 20?
Inclusion and exclusion pronciple
hello @div_yanshu07
by default any number is treated as int datatype type.
so here 1 is also acting as int.
adding that ll at the end will typecast it to long long .
but here that ll at the end will not create any difference.
ll denom=1 ;
is same as ll denom=1ll;
both are same.
to understand the difference.
print these two statements,
cout<< (1<<40); // overflow will occur
cout<<(( 1 ll)<<40 ) ; // overflow will not occur
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.