fix long long int issue in problem B