2 ms·
For the perfect number question, you can always just argue that precomputing a 512 MiB bit array that has 1 in position n if n is a perfect number, then indexin
by pmiller2 7y ago
For the perfect number question, you can always just argue that precomputing a 512 MiB bit array that has 1 in position n if n is a perfect number, then indexing into that bit array is O(1). Because the range is constrained, you don't need to know anything about perfect numbers to come up with this.