The guesswork quantifies the minimum number of queries needed to guess the state of a quantum ensemble if one is allowed to query only one state at a time. Previous approaches to the computation of the guesswork were based on standard semi-definite programming techniques and therefore lead to approximated results. In contrast, our main result is an algorithm that, upon the input of any qubit ensemble over a discrete ring and with uniform probability distribution, after finitely many steps outputs the exact closed-form analytic expression of its guesswork. The complexity of our guesswork-computing algorithm is factorial in the number of states, with a morethan-quadratic speedup for symmetric ensembles. To find such symmetries, we provide an algorithm that, upon the input of any point set over a discrete ring, after finitely many steps outputs its exact symmetries. The complexity of our symmetries-finding algorithm is polynomial in the number of points. As examples, we compute the guesswork of regular and quasi-regular sets of qubit states.