The total probability of a sample space is 1. So if the probability of choosing a square is subtracted from 1 then we will find the probability of choosing a rectangle that is not a square. The cardinality of choosing a rectangle from N x N chessboard is n+1 choose 2 multiplied by n+1 choose 2. And the cardinality of choosing a square from the N x N chessboard is n(n+1)(2n+1) / 6. So the probability choosing a rectangle that is not a square will be 1((n(n+1)(2n+1)/6)/(n+12)2)1 - ( (n ( n + 1)(2n + 1) / 6 ) / {n+1 \choose 2}^{2} )

Statistics

95% Solution Ratio
tanvirtareqEarliest, Feb '22
S_SubrataFastest, 0.0s
tanvirtareqLightest, 131 kB
Nusab19Shortest, 112B
Toph uses cookies. By continuing you agree to our Cookie Policy.