-
Notifications
You must be signed in to change notification settings - Fork 2
oktalni
bradendubois edited this page Jun 9, 2021
·
6 revisions
ID: oktalni
Difficulty: 1.9
CPU Time: 1 second
Memory: 1024 MB
Easiest way to pad/group as per the instructions is to take in the number, and reverse it, and pad with 0s until the length of the number is divisible by 3. After this, until the string is empty, repeatedly: loop 3 times, popping the last digit off the number, and if it is a 1, add 2^{0, 1, 2} to a tally, then output that number.