esolang
Learn · LessonsLesson 9 of 18

Lesson 9

Deadfish's 256 reset

Deadfish has one odd rule. Whenever the accumulator becomes exactly 256 or exactly -1, it is reset to 0.

The lesson

So iisss goes 2, 4, 16, 256 and lands on 0, and d at 0 stays 0.

In the Deadfish dictionary, the reset is a word, fix, that every rule calls after changing the number.

Deadfish has its own page, and Run opens this example in the editor.

Example

Output


Exercise 1

Print 255.

Run tries your program on the input below. Check runs it on every test.

The tests it must pass
InputExpected output
(empty)255

Output


A hint

15 squared is 225; then thirty more.

One answer

Answer: Print 255.

Expected output

255
The tests it must pass
InputExpected output
(empty)255

Output


Exercise 2

Print 16, then 0, with a single s between the two prints.

Run tries your program on the input below. Check runs it on every test.

The tests it must pass
InputExpected output
(empty)16 0

Output


A hint

16 squared is 256, and 256 becomes 0.

One answer

Answer: Print 16, then 0, with a single s between the two prints.

Expected output

16
0
The tests it must pass
InputExpected output
(empty)16 0

Output


Read more