I’m getting a timeout in one of the test cases. Can you please help me out in solving the problem. I dont get how to use bitmasking in this problem.
Not so easy math problem in bitmasking
Approach for this question is :This question is based on inclusion exclusion principle (Set theory)
let a,b,c,d,e,f… represent set of prime numbers less than 20.
Now you have to find
a union b union c union d…
this can be found by inclusion exclusion principle.
In case you need explanation do post it.
Video reference https://www.youtube.com/watch?time_continue=122&v=tMRZ6gqFYdg 2
Hit like if you get it
Cheers!
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.