Write the whole of the holed using the unholed
GolfScript, 37 36 characters
[":=<?)-/! YX[]VIHKx{}|~vih"{25^}/]+
Try the code here.
The string contains the forbidden characters xor'ed with 25. Fortunately all characters are mapped to valid ones.
Brainfuck 119
--[------->++<]>-.+.+.+.++++++++++.++++.++.++.+.+++++++.+.+.++.+++++++++++.+.+.+.[------>+<]>--.+.++.+.++.++++++++.+.+.
Bonus - dc, 179 characters
Oh good, another restricted character set challenge where P
is allowed.
6A44469PD684P44D4898PDB99P4008D0BP486B48BPA60BPD096P4A68666P460A0D4P690490AP8084088P6B6AB66P6BBB608P80D4BAAPA046PBAD4P60A6668P480DD96P4A040BBP848BP40DD8D0P46840B6P696B48BP48D64BAP
Since dc
is apparently obscure enough to require explaining (strange to me considering the weird stuff around here!) here's an overview:
It's primarily an RPN calculator with arbitrary-precision arithmetic. But for this challenge, I'm making use of the P
command, which interprets a number as a series of characters in base 256 and prints them. Examples: 65 P
prints A
(ASCII code 65). 16706 P
prints AB
(16706=65*256+66).
Aside from that, the only other interesting feature is that it recognizes all of the hexadecimal digits 0-9A-F
even when they are not contained in a hexadecimal number. Decimal input is the default, so the input token 999
means 9 hundreds + 9 tens + 9
and ABC
means 10 hundreds + 11 tens + 12
making it equivalent to 1122
.
The ability to use the digits ABD
in decimal partially makes up for the inability to use 12357
, and the choice of ordering and grouping does the rest. (If I need some numbers x
,y
,z
and they aren't representable with allowed digits, then I try representing x*256*256+y*256+z
instead.)
The program can probably be made slightly shorter by using larger groups. I didn't go past 3 bytes per number.