Not So Easy Math ( wrong answer)

i find all case of exclusion first and then apply inclusion exclusion principle.
on custom test cases it is giving right ans,
but can not understand test case which is giving wrong ans.
@tushar

i guess you made two post similar! answering on other post