-
Notifications
You must be signed in to change notification settings - Fork 2
modulo
bradendubois edited this page Jun 9, 2021
·
6 revisions
ID: modulo
Difficulty: 1.4
CPU Time: 1 second
Memory: 1024 MB
Nothing too complicated: keep a map to track the occurrences of numbers, and a tally of unique remainders. At each number, see if its remainder (modulo 42) has been seen in the map, if not, increment the tally, but increment the occurrences of this number in the map either way.