Project Euler 151 - Paper sheets of standard sizes: an expected value problem

Official link: https://projecteuler.net/problem=151