Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Challenges

Post History

85%
+10 −0
Challenges Output 256 in many different ways

Raku, 18 solutions 256 ٢٥٦ ۲۵۶ ߂߅߆ ২৫৬ ᠒᠕᠖ 𑄸𑄻𑄼 4⁴ 0x100 ord Q`Ā` '~~~'~^'LKH' 888-88-88-88-88-88-88-88-8-8 99+99+9+9+9+9+9+9+?9+?9+?9+?9 ($_=3333333)&&m|(3)(3)(3)(3)*|&&...

posted 3y ago by Jo King‭  ·  last activity 3y ago by Jo King‭

Answer
#1: Initial revision by user avatar Jo King‭ · 2020-12-07T23:26:54Z (over 3 years ago)
# [Raku], 18 solutions

<!-- language-all: lang-perl6 -->
~~~
256
٢٥٦
۲۵۶
߂߅߆
২৫৬
᠒᠕᠖
𑄸𑄻𑄼
4⁴
0x100
ord	Q`Ā`
'~~~'~^'LKH'
888-88-88-88-88-88-88-88-8-8
99+99+9+9+9+9+9+9+?9+?9+?9+?9
($_=3333333)&&m|(3)(3)(3)(3)*|&&$3**$3
[[];[];[];[]]×[[];[];[];[]]×[[];[];[];[]]×[[];[];[];[]]
"{"{7%%7%7}{7%7}7"%7}{"{7%%7%7}{7%%7%7}7"%7}{"{7%%7%7}{7%%7%7}{7%%7%7}"%7}"
</ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / />/</ />
q:w!a\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na!.Int
~~~

[Try it online!][TIO-kif4qpws]

[Raku]: https://github.com/nxadm/rakudo-pkg
[TIO-kif4qpws]: https://tio.run/##K0gtyjH7/z@3UkGlUgdEVlhzcaXlFylo1ORk5qUW6ygVWpUrJlYrxeQlKlUoGJma1irqeeaVKGkq6NopqFQpVHMpKBQnAjVW6bmGOfpYA7kgYxKtoeJKfvl5CqV5mYWlqQpJlSWpGsWaCkp1Kol62amVxXrJGUXFCplpQPUKtkAXKGioaYJMSs1Lzk9J1YNoA5kEkqrRtMUuV6Gtbc1Vy8UFti4kvyQxxwooqGT9/7@RqRnXzUU3l95cxnV70@2tt7dx3W@633q/jevB8hUPlq9@sHwN18MFkx4umPpwwTSuDxNbdgDxbiDew2XyqHELl0GFoYEBV35RCmdgwpGGBC71uro69bo4dR9vD3UuCwsLXexI14LL0lIbhJCgPQJxaajE26rYGkOApppabo2GsSYcadWoqakYa2mpGHNFR8daw1Ds4ekkcLmUqpWqzVVVzVXNa6tBhLkSiIUspopHGEaDZJW4bPQVRuEoHIUjFNrpg0oAOwA

The last solution use newline characters, so the `\n`s should be replaced by linefeeds. These solutions are mostly helped by Raku's unicode operators and digits, as well as being able to convert from lists or strings to numbers freely, where lists are equal to their length.

### 1. through 7.
~~~
256
٢٥٦
۲۵۶
߂߅߆
২৫৬
᠒᠕᠖
𑄸𑄻𑄼
~~~
These are all numeric literals of 256 in different unicode digits (with no bytes overlapping). Yes, Raku supports this. No, I don't know why.

### 8. 
~~~
4⁴
~~~

Four to the power of 4

### 9.
~~~
0x100
~~~

Hexadecimal of 256

### 10.
~~~
ord
Q`Ā`
~~~

Get the ordinal value of the 256th character.


### 11.
~~~
'~~~'~^'LKH'
~~~

String xor `~~~` with `LKH` to get 256.

### 12.
~~~
888-88-88-88-88-88-88-88-8-8
~~~

Some basic arithmetic to get 256

### 13.
~~~
99+99+9+9+9+9+9+9+?9+?9+?9+?9
~~~

More arithmetic, using `?` to boolify 9 to True, which then is numerically 1.

### 14.
~~~
($_=3333333)&&m|(3)(3)(3)(3)*|&&$3**$3
~~~

Set `$_` to 3333333, then match some 3s such that the fourth group is of length 4, then return that group to the power of itself (`4**4`). This one might be a little iffy, since it relies on the existing `$_` variable to be mutable, (which it is by default).

### 15.
~~~
[[];[];[];[]]×[[];[];[];[]]×[[];[];[];[]]×[[];[];[];[]]
~~~

Make a list of length 4 and multiply it by itself four times.

### 16.
~~~
"{"{7%%7%7}{7%7}7"%7}{"{7%%7%7}{7%%7%7}7"%7}{"{7%%7%7}{7%%7%7}{7%%7%7}"%7}"
~~~

Uses modulo and divisibility operators with string interpolation to generate numbers.

~~~
  "{"{1}{0}7"%7}{"{1}{1}7"%7}{"{1}{1}{1}"%7}"
= "{2}{5}{6}"
= 256
~~~ 

### 17.
~~~
</ / ... / />/</ />
~~~

Create a list with length 512 and divide it by a list with length 2.

### 18.
~~~
q:w!a
a
...
a
a!.Int
~~~

Create a list of length 256 using the words quoting construct and then convert it to an integer.


### Conclusion

I can certainly save some characters from some solutions to use later, but I've sort of run out operators that can convert them to numbers. I still have carriage returns for whitespace, so maybe there's a function I can still use.