A device, comprising: one or more processors configured to: receive a plurality of requests, for access to a resource, from a plurality of client devices; detect, based on the plurality of requests, a denial-of-service attack; determine, based on receiving an additional request from a client device, a computationally expensive problem; determine a percentage of client devices to which to provide the computationally expensive problem, a quantity of client devices in the percentage of client devices being less than a quantity of client devices in the plurality of client devices, and the percentage of client devices being determined based on a denial-of-service metric, associated with the plurality of requests, satisfying a threshold; provide the computationally expensive problem to each client device of the percentage of client devices, the computationally expensive problem causing each client device, of the percentage of client devices, to solve the computationally expensive problem; receive, from each client device of the percentage of client devices, a solution to the computationally expensive problem; and selectively grant or deny a particular client device, of the percentage of client devices, access to the resource based on whether the solution to the computationally expensive problem, received from the particular client device of the percentage of client devices, is correct. one or more processors configured to: receive a plurality of requests, for access to a resource, from a plurality of client devices; detect, based on the plurality of requests, a denial-of-service attack; determine, based on receiving an additional request from a client device, a computationally expensive problem; determine a percentage of client devices to which to provide the computationally expensive problem, a quantity of client devices in the percentage of client devices being less than a quantity of client devices in the plurality of client devices, and the percentage of client devices being determined based on a denial-of-service metric, associated with the plurality of requests, satisfying a threshold; provide the computationally expensive problem to each client device of the percentage of client devices, the computationally expensive problem causing each client device, of the percentage of client devices, to solve the computationally expensive problem; receive, from each client device of the percentage of client devices, a solution to the computationally expensive problem; and selectively grant or deny a particular client device, of the percentage of client devices, access to the resource based on whether the solution to the computationally expensive problem, received from the particular client device of the percentage of client devices, is correct. receive a plurality of requests, for access to a resource, from a plurality of client devices; detect, based on the plurality of requests, a denial-of-service attack; determine, based on receiving an additional request from a client device, a computationally expensive problem; determine a percentage of client devices to which to provide the computationally expensive problem, a quantity of client devices in the percentage of client devices being less than a quantity of client devices in the plurality of client devices, and the percentage of client devices being determined based on a denial-of-service metric, associated with the plurality of requests, satisfying a threshold; a quantity of client devices in the percentage of client devices being less than a quantity of client devices in the plurality of client devices, and the percentage of client devices being determined based on a denial-of-service metric, associated with the plurality of requests, satisfying a threshold; provide the computationally expensive problem to each client device of the percentage of client devices, the computationally expensive problem causing each client device, of the percentage of client devices, to solve the computationally expensive problem; receive, from each client device of the percentage of client devices, a solution to the computationally expensive problem; and selectively grant or deny a particular client device, of the percentage of client devices, access to the resource based on whether the solution to the computationally expensive problem, received from the particular client device of the percentage of client devices, is correct.