Some test case not passing - Religious people

Please help me find if i am missing spmething

Use long long int to prevent integer overflow.