I used the online
Cooler Master: Power Supply Calculator
to calculate, as closely as I could follow your specs, the power consumption of
one computer.
At 50% CPU utilization I got 130 W, while at 90% I got 166 W, which does
not include the power drawn by the monitor.
I don't think that your students will be using their computers very intensively
during a power blackout, or at all.
But if they do, let's say they each use 150 W,
which gives over 40 computers the total of 6000 W.
I have tried to compare this with
(only for example and not advocating it at all)
this UPS,
costing about $6000.
Even such a costly UPS is only able to supply 7,000 Watts for just
9 Minutes on internal batteries.
At further expense, this can be driven up to the maximum of
1 Hour 39 minutes for this UPS by adding external batteries.
I therefore don't see the point in an expensive 10kVA UPS, which will only
solve the problem for a short time.
A 6kVA UPS, whose main function should be to let the course gracefully terminate,
should be enough.
If you wish more than that, you should invest in an emergency generator
running on fuel. The UPS should only last the time required to start up
the generator.