Topic : Bit mask.
Why getting wa in this test cases :
2
16 12
F853AD64B1EC7290
16 18
8192BEFA70CD3564
Correct Output :
Case 1: 5230697472000
Case 2: 3486618432000
My output :
Case 1: 2324797191360
Case 2: 1226335446000
Question : http://lightoj.com/volume_showproblem.php?problem=1021
My code: https://ideone.com/2XjGaV
Please check line 157:
should be changed to
Best wishes