for Andrey’s friends
This page contains the author’s solution ideas for the New Year Contest that took place on January 1, 2026. If you haven’t solved the tasks yet, I suggest you solve them first (even if you didn’t participate in the contest itself), and only then read the write-ups. To do that, register on the main page at 2026.andgein.ru. There you can also read what this New Year Contest of ours is all about.
Even though there are no ready-made programs here, below you’ll find the contents of the levels and solution ideas for all tasks — which means a huge number of spoilers. Be careful!
Attention! This page contains answers to all tasks. Please, if you’ve already seen an answer, do not submit it under your own name for judging. You can and should still solve the tasks, but not by copying answers from this page :-)
Jump to the write-up for a specific task:
In this task, you had to construct an arithmetic expression of a given length (or shorter) whose value equals a given integer. At the same time, you were not allowed to use certain characters in the expression — for example, some digits and the “+” symbol. The target integer, the length limit, and the set of forbidden characters changed from level to level: on the first level, for instance, you had to get 2026 from an expression no longer than 7 characters, without using the digits 2, 0, and 6.
The answer was validated using
Python’s eval() function,
with additional restrictions: you could not import modules, call functions, or access attributes.
The first few levels could be solved by hand — it was enough to use simple operations like addition, subtraction, multiplication, and exponentiation.
| # | Value | Prohibited characters | Max length | Example answer | Even shorter |
|---|---|---|---|---|---|
| 1 | 2026 | 2 0 6 | 7 | 1989+37 | |
| 2 | 4096 | 4 0 9 6 8 | 5 | 2**12 | |
| 3 | 32768 | 3 2 7 6 8 | 5 | 2**15 | |
| 4 | 4 | 0 2 3 4 5 6 7 8 9 | 7 | 1+1+1+1 | ~1*~1 |
| 5 | 2026 | 0 2 3 4 5 6 7 8 9 | 18 | (1+1)**11-11*(1+1) | 11*~1^-1<<11 |
| 6 | 2026 | 0 1 3 4 5 6 7 8 9 | 15 | 2222-222+22+2+2 | 2^22*-~22<<2 |
| 7 | 387420489 | (нет) | 4 | 9**9 | |
For the harder levels, you could write a brute-force search starting from all possible integers that can be formed from the “allowed” digits, and generating all expressions of lengths 1, 2, 3, and so on by building more and more complex expressions. It’s important not to get tripped up by operator precedence, but an LLM writes this kind of code very well.
On some levels you could also add fractional numbers or numbers in scientific notation (4e6) to
find the optimal expression. This is easy to do: you just add those numbers to the initial set of numbers
the search starts from.
Also, it’s useful to start using the bitwise NOT operator ~ on a number.
For example, ~1 == -2 (an explanation of why).
| # | Value | Prohibited characters | Max length | Example answer | Even shorter |
|---|---|---|---|---|---|
| 8 | 4 | 0 2 3 4 5 6 7 8 9 | 5 | ~1*~1 | |
| 9 | 2026 | 0 2 3 4 5 6 7 8 9 | 13 | 11*~1+(1<<11) | 11*~1^-1<<11 |
| 10 | 2026 | 0 1 3 4 5 6 7 8 9 | 12 | 2|22*-~22<<2 | |
| 11 | 77777 | 0 1 6 7 9 | 9 | 38888.5*2 или 233332//3 | 8e4-2223 |
| 12 | 3333333 | 0 1 2 3 7 8 9 | 10 | 666666.6*5 | 5e6*4//6 |
| 13 | 3703629630 | 0 1 2 3 4 7 8 9 | 11 | 66666*55555 | |
| 14 | 267557741 | 0 3 4 5 6 7 8 9 | 11 | 121*2211221 | |
| 15 | 10692 | 0 2 3 4 5 6 7 9 | 9 | 1881+8811 | ~8*-1188 |
| 16 | 3704479 | 0 1 2 3 4 7 8 9 | 10 | 6556.6*565 | |
| 17 | 22896 | 0 1 2 4 5 6 7 9 | 12 | 8883888//388 | |
| 18 | 88507 | 0 1 3 4 6 7 9 | 9 | 222+88285 | 85^88558 |
| 19 | -150 | 0 2 4 5 6 7 9 | 9 | 1183-1333 | 38-188 |
The next group of levels focused on hexadecimal notation, since it lets you build expressions without using digits at all! The solution approach doesn’t change, though — you just need to add hexadecimal numbers to the list of starting values if you aren’t allowed to use any digits other than zero. Zero is needed because hexadecimal numbers in Python are written like 0xBEA.
| # | Value | Prohibited characters | Max length | Example answer | Even shorter |
|---|---|---|---|---|---|
| 20 | 65535 | 6 5 3 4 8 | 6 | 0xffff | |
| 21 | 3134175981 | 1 2 3 4 5 6 7 8 9 | 10 | 0xbacfbaed | |
| 22 | 68522 | 1 2 3 4 5 6 7 8 9 | 12 | 0xfef+0xfbbb | |
| 23 | 52216 | 1 2 3 4 5 6 7 8 9 | 13 | 0xebfb&0xcbfc | ~-~-0xcbfa |
| 24 | 2060 | 1 2 3 4 5 6 7 8 9 | 14 | 0xfc0c&0xd0aae | 0xa*0xce |
| 25 | 2717 | 1 2 3 4 5 6 7 8 9 | 13 | 0xddfdf&0xabd | 0xaab-0xe |
| 26 | 52620 | 1 2 3 4 5 6 7 8 9 | 14 | 0xadfbc&0xedcd | 0xbd+0xcccf |
| 27 | 54356248353 | 1 2 3 4 5 6 7 8 9 | 14 | 0xfbdf*0xcdcff | |
| 28 | -89152 | 1 2 3 4 5 6 7 8 9 | 15 | 0xba0ce-0xcfd0e | -0xbba0-0xa0a0 |
| 29 | 42012 | 1 2 3 4 5 6 7 8 9 | 12 | 0xaa0^0xaebc | 0xc*0xdad |
| 30 | 2026 | 1 2 3 4 5 6 7 8 9 y o u w a n t d e c a f ? I W A N T D E C A F ! | 26 | (-~0-~0)**0xb-0xb*(-~0-~0) | ~0<<0xb^-0xb-0xb |
But what if you’re forbidden to use all digits — even zero? That’s where the True constant comes in handy,
because True == 1 (“Why is bool a subclass of int?”)!
This way, you can build expressions using only True:
for example, (True+True<<True+True)+True == 9. To do this, you first build an expression
using only ones, and then replace all ones with “True”. And for that we already have code!
You just need to reduce the list of starting numbers to [1] — you can’t use anything but one now.
For simplicity and speed, you can generate expressions not only from ones, but from ones and twos, and then replace twos
with -~True (don’t forget to get rid of the occasional double minus “--” by replacing it with pluses).
| # | Value | Prohibited characters | Max length | Example answer |
|---|---|---|---|---|
| 31 | 1 | 0 1 2 3 4 5 6 7 8 9 | 4 | True |
| 32 | 2 | 0 1 2 3 4 5 6 7 8 9 / | 6 | -~True |
| 33 | 6 | 0 1 2 3 4 5 6 7 8 9 / | 13 | ~True*~-~True |
| 34 | 52 | 0 1 2 3 4 5 6 7 8 9 / | 35 | ~True*~True^True-~True<<~True*~True |
| 35 | 10 | 0 1 2 3 4 5 6 7 8 9 - / | 22 | True+~True*~True<<True |
| 36 | 841 | 0 1 2 3 4 5 6 7 8 9 / | 38 | (~-~True^~True<<~True*~True)**(-~True) |
| 37 | 863 | 0 1 2 3 4 5 6 7 8 9 / | 38 | ~(~-~True<<-~True)**(True-~True)>>True |
| 38 | 602 | 0 1 2 3 4 5 6 7 8 9 / | 52 | -~True^~-~True*~(True-~True<<True-~True)<<True-~True |
| 39 | 1508 | 0 1 2 3 4 5 6 7 8 9 / | 50 | ~True*(~True^~(~-~True<<~True*~True)<<~True*~True) |
| 40 | 1403 | 0 1 2 3 4 5 6 7 8 9 / | 53 | ~(~-~True<<True-~True)*(~-~True^-True<<~True*~-~True) |
| 41 | 1286 | 0 1 2 3 4 5 6 7 8 9 / | 50 | ~True*~-~True^True+~True*~True<<(True<<True-~True) |
| 42 | 1885 | 0 1 2 3 4 5 6 7 8 9 | 46 | ~(-~-~True<<-~True)*~(~-~True<<-~True)**-~True |
| 43 | 636 | 0 1 2 3 4 5 6 7 8 9 | 40 | ~(~-~True+~True<<-~True-~-~True)<<-~True |
| 44 | 774 | 0 1 2 3 4 5 6 7 8 9 | 36 | ~-~True*~-~(~True)**(-~True<<-~True) |
| 45 | 819 | 0 1 2 3 4 5 6 7 8 9 | 43 | (~-~True)**(-~True<<-~True)+~True>>-~-~True |
| 46 | 1536 | 0 1 2 3 4 5 6 7 8 9 | 25 | -~-~True<<~-~True*~-~True |
| 47 | 2435 | 0 1 2 3 4 5 6 7 8 9 | 59 | -~-~True^True+-~True*~-~True*~-~True<<-~True-~-~True+-~True |
| 48 | 2061 | 0 1 2 3 4 5 6 7 8 9 | 45 | True^(-~-~True^True<<~-~True*~-~True)<<-~True |
| 49 | 2089 | 0 1 2 3 4 5 6 7 8 9 | 55 | True^-~True-~-~True+(~True)**(-~True<<-~True)<<-~-~True |
| 50 | 2108 | 0 1 2 3 4 5 6 7 8 9 | 46 | (True^~-~True<<-~-~True)**-~True+~True<<-~True |
| 51 | 573 | 0 1 2 3 4 5 6 7 8 9 | 35 | ~-~True+(~-~True<<-~-~True)**-~True |
The final levels covered the case where the letter “e” is also forbidden, which means you can’t write True anymore...
In that case, you need to replace one with not[].
And if square brackets are forbidden as well, then use not() or ()==() — limits were quite soft.
| # | Value | Prohibited characters | Max length | Example answer |
|---|---|---|---|---|
| 52 | 919 | 0 1 2 3 4 5 6 7 8 9 E e | 85 | (not[])+~(not[])*~((not[])<<~(not[])*~(not[]))*((not[])-~(not[]))**((not[])-~(not[])) |
| 53 | 1942 | 0 1 2 3 4 5 6 7 8 9 E e | 68 | ~(not[])^(~-~(not[]))**((not[])+~(not[])*~(not[]))<<(not[])-~(not[]) |
| 54 | 2506 | 0 1 2 3 4 5 6 7 8 9 E e | 75 | (not[])+~(not[])*~((not[])+~(not[])*~(not[]))**(~(not[])*~(not[]))<<(not[]) |
| 55 | 656 | 0 1 2 3 4 5 6 7 8 9 E e | 53 | -~(~-~(not[]))**(~(not[])*~(not[]))<<(not[])-~(not[]) |
| 56 | 1047 | 0 1 2 3 4 5 6 7 8 9 E e | 70 | ~((~-~(not[])^(not[])<<(not[])+~(not[])*~-~(not[]))<<(not[])-~(not[])) |
| 57 | 797 | 0 1 2 3 4 5 6 7 8 9 E e | 75 | ~-~(not[])^~((not[])-~(not[])<<(not[])-~(not[]))<<(not[])+~(not[])*~(not[]) |
| 58 | 2540 | 0 1 2 3 4 5 6 7 8 9 E e | 71 | ~(~(not[])<<~(not[])*~-~(not[]))*((not[])+~(not[])*~(not[])<<-~(not[])) |
| 59 | 2127 | 0 1 2 3 4 5 6 7 8 9 E e | 85 | ((not[])+~(not[])*(~(not[])^(not[])<<~(not[])*~-~(not[]))<<~(not[])*~(not[]))-(not[]) |
| 60 | 1991 | 0 1 2 3 4 5 6 7 8 9 E e | 72 | ~(~(~(~(not[])<<~(not[])*~(not[]))<<(not[])-~(not[]))<<(not[])-~(not[])) |
| 61 | 1190 | 0 1 2 3 4 5 6 7 8 9 E e | 78 | (not[])-~-~(not[])*~-~(not[])*(~(not[])^(not[])<<~(not[])*~-~(not[]))<<(not[]) |
| 62 | 467 | 0 1 2 3 4 5 6 7 8 9 E e ' " ! @ # $ % [ ] { } | 76 | ~(~(()==())<<(()==())-~(()==()))*~(~(()==())<<~(()==())*~(()==()))-~(()==()) |
| 63 | 1474 | 0 1 2 3 4 5 6 7 8 9 E e ' " ! @ # $ % [ ] { } | 68 | -~(()==())^~(~-~(()==())<<(()==())-~(()==()))<<~(()==())*~-~(()==()) |
| 64 | 741 | 0 1 2 3 4 5 6 7 8 9 E e ' " ! @ # $ % [ ] { } | 84 | ~-~(()==())*((()==())^((()==())^~(()==())<<~(()==())*~(()==()))<<(()==())-~(()==())) |
| 65 | 235 | 0 1 2 3 4 5 6 7 8 9 E e ' " ! @ # $ % [ ] { } | 66 | ((()==())+~(()==())*~(()==()))*~(~-~(()==())<<~(()==())*~(()==())) |
| 66 | 2330 | 0 1 2 3 4 5 6 7 8 9 E e ' " ! @ # $ % [ ] { } | 94 | ~-~(()==())*~-~(()==())*((()==())-~(()==())^(()==())<<((()==())<<(()==())-~(()==())))-(()==()) |
| 67 | 680 | 0 1 2 3 4 5 6 7 8 9 E e ' " ! @ # $ % [ ] { } | 61 | (-(()==())<<~-~(()==())*~-~(()==()))//~-~(()==())<<-~(()==()) |
| 68 | 1360 | 0 1 2 3 4 5 6 7 8 9 E e ' " ! @ # $ % [ ] { } | 69 | (-(()==())<<~-~(()==())*~-~(()==()))//~-~(()==())<<(()==())-~(()==()) |
| 69 | 1835 | 0 1 2 3 4 5 6 7 8 9 E e ' " ! @ # $ % [ ] { } | 90 | ~(~((()==())<<~(()==())*~(()==()))*((()==())-~(()==()))**((()==())-~(()==()))<<-~(()==())) |
| 70 | 1564 | 0 1 2 3 4 5 6 7 8 9 E e ' " ! @ # $ % [ ] { } | 83 | (()==())+~((()==())+~(()==())*~(()==()))**((()==())+~(()==())*~(()==()))//~(()==()) |
| 71 | 2687 | 0 1 2 3 4 5 6 7 8 9 E e ' " ! @ # $ % [ ] { } | 78 | ~(~((()==())+~(()==())*~(()==())<<-~(()==()))<<(()==())+~(()==())*~-~(()==())) |
Note: operations like ~(not[]) do work, but they trigger a warning in modern Python:
>>> ~(not[])
<stdin>:1: DeprecationWarning: Bitwise inversion '~' on bool is deprecated and will be removed in Python 3.16. This returns the bitwise inversion of the underlying int object and is usually not what you expect from negating a bool. Use the 'not' operator for boolean negation or ~int(x) if you really want the bitwise inversion of the underlying int.
-2
Luckily, it’s 2026, and Python 3.16 won’t come out until 2027 ;-)
Note 2: during the contest, participants found an elegant way to obtain numeric constants:
b'"'[b''<b'']*b'K'[b''<b'']-b'\n'[b''<b'']
Cool!
In this task, you had to guess a sequence of numbers chosen in the game “Bulls and Cows”, given all the guesses and the number of bulls/cows for each guess.
If there were multiple possible sequences, as a small extra twist you had to find the lexicographically smallest one.
I don’t know any way to solve this task better than with brute force. What’s more, today’s LLMs with the ability to run code are pretty good at brute-forcing the answers and finding the correct one. The only real issue you might run into is the time limit. We need to brute-force efficiently enough to clear all levels within the contest’s five hours! That was the main difficulty of this task.
As in the other tasks, the first levels can be solved by hand — in them the secret sequence is reconstructed uniquely (if you assume the sequence doesn’t contain numbers greater than ten).
For the harder levels, a straightforward brute-force over all possible secret sequences and checking each one will do.
MAX_NUMBER = 10
NUMBER_COUNT = 4
for secret in itertools.permutations(range(1, MAX_NUMBER), NUMBER_COUNT):
if is_valid(secret):
return secret
def is_valid(secret: list[int]) -> bool:
for numbers, bulls, cows in guesses:
if score(secret, numbers) != (bulls, cows):
return False
return True
def score(secret: list[int], guess: list[int]) -> tuple[int, int]:
bulls = sum(1 for i in range(len(secret)) if secret[i] == guess[i])
common = len(set(secret) & set(guess))
return bulls, common - bulls
To speed up this brute force, you could implement backtracking —
gradually add numbers one by one to secret while keeping track of how many “bulls”
and “cows” you’ve already accumulated for each given guess. If for at least one guess they exceed
the required amount, the search stops and we move on to the next options.
This approach lets you prune a large number of “dead” branches.
But the fastest solution I know reformulates the problem as a SAT problem and uses one of the existing frameworks for solving such problems: for example, Google OR-Tools or Microsoft Z3. Bindings for these libraries exist for many programming languages, and the solution boils down to declaring the right number of variables and stating all the constraints. For example, with Z3:
s = z3.Solver()
x = [z3.Int(f"x_{i}") for i in range(K)]
for xi in x:
s.add(And(xi >= 1, xi <= N))
s.add(Distinct(x))
for numbers, bulls, cows in guesses:
add_guess_constraints(s, x, numbers, bulls, cows)
View how you can implement add_guess_constraints()
def add_guess_constraints(solver, secret_vars, guess: list[int], bulls: int, cows: int):
K = len(secret_vars)
# Counting Bulls: positions where secret[i] == guess[i]
bull_bools = [secret_vars[i] == guess[i] for i in range(K)]
bull_count = z3.Sum([z3.If(b, 1, 0) for b in bull_bools])
solver.add(bull_count == bulls)
# Counting Cows
exists_in_secret = []
for value in guess:
# 1 if the value is in the secret, 0 otherwise
value_exists_in_secret = z3.Sum([z3.If(secret_vars[i] == value, 1, 0) for i in range(K)])
exists_in_secret.append(value_exists_in_secret)
total_common = z3.Sum(exists_in_secret)
solver.add(total_common == bulls + cows)
To find the minimum solution, you can use Z3’s built-in optimizer — z3.Optimize(),
but in my experiments it turned out to be slower (YMMV!) than the following approach:
let’s enumerate short prefixes in lexicographic order (start with “1 2”, then “1 3”, and so on),
fix them in our answer, and try to find any (not necessarily minimal!) solution using z3.Solver().
If one is found, and none were found for the previous prefixes, that means we’ve found the smallest possible prefix! Keep extending it
until we get the full answer.
| # | Level Description | Answer |
|---|---|---|
| 1 | 5 attempts, each with 4 numbers | 8 6 1 4 |
| 2 | 6 attempts, each with 4 numbers | 4 2 1 6 |
| 3 | 1 attempt with 4 numbers | 5 1 8 2 |
| 4 | 3 attempts, each with 4 numbers | 3 5 7 1 |
| 5 | 4 attempts, each with 4 numbers | 1 5 4 2 |
| 6 | 3 attempts, each with 4 numbers | 3 2 6 7 |
| 7 | 4 attempts, each with 4 numbers | 1 7 4 3 |
| 8 | 6 attempts, each with 4 numbers | 3 8 6 5 |
| 9 | 8 attempts, each with 4 numbers | 10 8 6 7 |
| 10 | 3 attempts, each with 4 numbers | 4 1 3 6 |
| 11 | 4 attempts, each with 4 numbers | 1 2 6 8 |
| 12 | 4 attempts, each with 4 numbers | 2 4 9 8 |
| 13 | 3 attempts, each with 4 numbers | 1 3 4 8 |
| 14 | 4 attempts, each with 4 numbers | 5 6 8 9 |
| 15 | 4 attempts, each with 4 numbers | 1 7 8 4 |
| 16 | 6 attempts, each with 5 numbers | 8 9 7 6 3 |
| 17 | 5 attempts, each with 5 numbers | 2 8 5 9 7 |
| 18 | 3 attempts, each with 5 numbers | 1 3 4 2 10 |
| 19 | 3 attempts, each with 5 numbers | 6 7 4 8 9 |
| 20 | 4 attempts, each with 5 numbers | 1 6 4 10 11 |
| 21 | 6 attempts, each with 5 numbers | 3 5 7 9 8 |
| 22 | 3 attempts, each with 5 numbers | 1 7 8 9 10 |
| 23 | 3 attempts, each with 5 numbers | 1 3 4 8 9 |
| 24 | 5 attempts, each with 5 numbers | 1 4 8 5 10 |
| 25 | 5 attempts, each with 5 numbers | 4 3 9 1 5 |
| 26 | 6 attempts, each with 5 numbers | 1 6 5 2 4 |
| 27 | 6 attempts, each with 5 numbers | 4 5 11 6 8 |
| 28 | 2 attempts, each with 6 numbers | 1 2 5 8 11 12 |
| 29 | 6 attempts, each with 6 numbers | 3 4 10 9 7 11 |
| 30 | 7 attempts, each with 6 numbers | 5 10 11 4 9 12 |
| 31 | 3 attempts, each with 6 numbers | 1 3 2 8 9 5 |
| 32 | 7 attempts, each with 5 numbers | 8 7 9 10 1 |
| 33 | 4 attempts, each with 6 numbers | 1 3 10 6 9 4 |
| 34 | 5 attempts, each with 6 numbers | 1 3 4 7 5 9 |
| 35 | 3 attempts, each with 5 numbers | 1 5 7 4 3 |
| 36 | 8 attempts, each with 5 numbers | 1 2 10 9 3 |
| 37 | 5 attempts, each with 5 numbers | 1 2 8 11 13 |
| 38 | 5 attempts, each with 6 numbers | 2 8 1 14 5 4 |
| 39 | 10 attempts, each with 6 numbers | 16 13 6 10 4 11 |
| 40 | 9 attempts, each with 7 numbers | 10 3 14 13 12 7 17 |
| 41 | 10 attempts, each with 7 numbers | 3 8 5 19 7 14 16 |
| 42 | 9 attempts, each with 8 numbers | 15 3 4 6 8 19 22 21 |
| 43 | 8 attempts, each with 8 numbers | 1 13 5 3 6 9 7 18 |
| 44 | 13 attempts, each with 9 numbers | 18 2 20 22 13 10 23 8 26 |
| 45 | 11 attempts, each with 9 numbers | 2 5 22 6 25 20 26 23 28 |
| 46 | 60 attempts, each with 4 numbers | 60 9 11 55 |
| 47 | 53 attempts, each with 5 numbers | 2 7 10 11 12 |
| 48 | 55 attempts, each with 6 numbers | 2 102 113 227 62 185 |
| 49 | 42 attempts, each with 7 numbers | 6 86 47 87 164 192 309 |
| 50 | 40 attempts, each with 8 numbers | 1 2 3 8 6 9 10 166 |
| 51 | 24 attempts, each with 10 numbers | 6 10 24 15 1 27 2 25 18 28 |
| 52 | 25 attempts, each with 10 numbers | 2 3 27 13 16 4 11 22 25 19 |
| 53 | 25 attempts, each with 10 numbers | 21 7 20 29 4 1 22 8 16 6 |
| 54 | 24 attempts, each with 10 numbers | 2 5 11 16 25 22 18 14 30 21 |
| 55 | 20 attempts, each with 10 numbers | 5 7 8 9 14 19 2 16 25 15 |
| 56 | 23 attempts, each with 10 numbers | 6 18 5 15 9 22 11 30 17 24 |
| 57 | 22 attempts, each with 10 numbers | 21 8 30 19 28 29 14 22 25 1 |
| 58 | 21 attempts, each with 10 numbers | 11 12 24 9 13 17 28 21 26 19 |
| 59 | 24 attempts, each with 10 numbers | 27 3 11 1 26 6 10 19 25 28 |
| 60 | 23 attempts, each with 10 numbers | 29 22 23 13 21 3 6 18 4 25 |
| 61 | 10 attempts, each with 10 numbers | 13 1 11 7 14 18 21 25 28 30 |
| 62 | 12 attempts, each with 10 numbers | 8 25 27 9 19 28 16 30 13 31 |
| 63 | 12 attempts, each with 10 numbers | 5 7 27 9 8 23 12 2 30 28 |
| 64 | 13 attempts, each with 10 numbers | 6 9 10 11 13 22 21 23 29 30 |
| 65 | 10 attempts, each with 10 numbers | 7 4 8 15 14 18 24 27 26 30 |
| 66 | 16 attempts, each with 10 numbers | 10 3 8 16 11 15 20 21 13 30 |
| 67 | 12 attempts, each with 10 numbers | 6 5 8 13 10 9 21 17 28 30 |
| 68 | 12 attempts, each with 10 numbers | 3 17 2 6 22 24 27 25 30 31 |
| 69 | 13 attempts, each with 10 numbers | 3 1 8 10 9 21 29 16 19 30 |
| 70 | 14 attempts, each with 10 numbers | 27 14 13 2 7 11 22 17 25 30 |
| 71 | 39 attempts, each with 12 numbers | 20 35 61 38 42 80 30 25 55 31 86 46 |
| 72 | 46 attempts, each with 12 numbers | 73 43 6 97 63 45 15 78 85 74 11 100 |
| 73 | 46 attempts, each with 12 numbers | 25 3 39 71 48 82 53 57 60 64 97 89 |
| 74 | 35 attempts, each with 12 numbers | 7 27 65 46 9 53 3 21 45 63 88 43 |
| 75 | 43 attempts, each with 12 numbers | 1 19 7 28 61 75 36 67 90 94 82 10 |
| 76 | 44 attempts, each with 12 numbers | 79 5 26 64 68 23 75 78 80 93 95 97 |
| 77 | 44 attempts, each with 12 numbers | 1 59 90 5 25 11 93 12 98 27 88 96 |
| 78 | 30 attempts, each with 12 numbers | 12 21 19 75 24 27 30 41 42 44 16 84 |
| 79 | 33 attempts, each with 12 numbers | 57 4 40 65 61 38 59 82 67 68 87 88 |
| 80 | 37 attempts, each with 12 numbers | 25 58 71 27 31 77 19 7 37 65 93 78 |
| 81 | 59 attempts, each with 14 numbers | 37 32 11 19 54 48 66 57 83 8 74 82 39 15 |
| 82 | 58 attempts, each with 14 numbers | 5 4 28 72 42 44 79 50 8 80 38 94 99 93 |
| 83 | 50 attempts, each with 14 numbers | 4 28 37 44 31 59 60 66 35 83 79 81 99 19 |
| 84 | 54 attempts, each with 14 numbers | 21 36 8 14 69 46 61 94 9 81 76 77 72 83 |
| 85 | 54 attempts, each with 14 numbers | 11 83 23 31 65 33 47 29 97 62 93 98 100 68 |
| 86 | 66 attempts, each with 14 numbers | 21 70 17 49 74 80 63 86 38 71 64 10 91 26 |
| 87 | 50 attempts, each with 14 numbers | 9 14 33 95 71 43 54 73 82 55 96 97 99 81 |
| 88 | 66 attempts, each with 14 numbers | 6 25 88 14 81 38 69 21 2 93 58 74 56 57 |
| 89 | 70 attempts, each with 14 numbers | 5 4 38 44 67 40 37 57 50 41 69 21 46 11 |
| 90 | 54 attempts, each with 14 numbers | 36 25 5 26 54 24 18 51 2 55 97 21 74 80 |
In this task, you had to write a fairly short program in the most famous
esoteric programming language, Brainfuck.
The program had to print a single string, but that string had to depend on (and only on!) what you fed the program
as input. For example, if the input is “what” the program should output “contest”,
and if the input is “where” — “2026.andgein.ru”.
In a normal programming language, such a program would be trivial:
input_line = read_line()
if input_line == "what":
print("contest")
if input_line == "where":
print("2026.andgein.ru")
Unfortunately (or fortunately!), Brainfuck doesn’t let you read an entire string at once, compare strings, or print them directly. Instead, it operates on individual memory cells or bytes (read about the language online if you haven’t worked with it before). It has other quirks too, but even with just these constraints, our program is forced to look something like this:
# Skip first two characters, because they are always "wh"
input_character = read_character()
input_character = read_character()
input_character = read_character()
if input_character == "a": # "what" branch
print("c")
print("o")
... # Print all characters of "contest" one by one
if input_character == "e": # "where" branch
print("2")
print("0")
... # Print all characters of "2026.andgein.ru" one by one
Another difficulty is that the language doesn’t even have a comparison like if input_character == "a".
Instead, we have to subtract 97 (the ASCII code for a) from the byte that stores input_character,
and then compare the result with zero, because that’s the only comparison
the language provides. So the easiest approach is to sort the letters we want to compare
input_character against and check them one by one by gradually subtracting:
# Skip first two characters, because they are always "wh"
input_character = read_character()
input_character = read_character()
input_character = read_character()
input_character -= 97 # ASCII code of "a"
if input_character == 0: # "what" branch
print("c")
print("o")
... # Print all characters of "contest" one by one
input_character -= 4 # ASCII code of "e" is 101, and 101 - 97 = 4
if input_character == 0: # "where" branch
print("2")
print("0")
... # Print all characters of "2026.andgein.ru" one by one
The remaining question is what to do when there are more than two possible strings, and some of them differ in the first character while others differ, say, in the third. Well, there’s no way around it! Let’s first read the first character and handle all possible cases for it; then, if needed, read the rest and again handle all scenarios until we figure out what we’re supposed to print. These ideas, together with a careful implementation and the ability to print the required strings reasonably efficiently, were enough to clear the first 20 levels — or even more.
| # | Input → output | Max. length | Possible program |
|---|---|---|---|
| 1 |
2026 | 61 | -[----->+<]>-.--.++.++++. (25 characters) |
| 2 |
0 → 1 1 → 0 | 231 | ,>+>++++++[-<<-------->>]<<[>>-[----->+<]>---.<<[-]]>[>-[----->+<]>--.<] (72 characters) |
| 3 |
happy → new year merry → christmas | 673 | ,>+>++++++++[-<<------------->>]<<[>>--[----->+<]>---.+++++.++++++++++.---------.++++++++++.+.-------.------------.--[--->+<]>--.<<]>[>+[------->++<]>.---------.[--->+<]>.+[---->+<]>++.--[->++++<]>+.--[->+++<]>.----.--[--->+<]>---.<] (233 characters) |
| 4 |
eyes → coal nose → carrot arms → sticks buttons → rocks | 749 | ,>+>++++++++[-<<------------>>]<<-[>+<-[>+<---[>>--[----->+<]>---.--.--[--->+<]>---..---.+++++.<<]>[>--[----->+<]>---.++++++++++++.--------------.+++++++++++.<]<[-]]>[>+[--------->++<]>.---.------------.++++++++.++++++++.<]<[-]]>[>+[--------->++<]>+.+.-----------.------.++++++++.++++++++.<] (291 characters) |
| 5 |
German → Frohe Weihnachten Spanish → Feliz Navidad Italian → Buon Natale | 1146 | ,>+>+++++++[-<<---------->>]<<-[>+<--[>>-[------->+<]>---.--[-->+++<]>-.+++++++.---.-[--->+<]>++.++[---->+<]>+.[-->+++++<]>--.[----->+++<]>-.+[--->+<]>.[------>+<]>.-----.---.+++.<<]>[>----[---->+<]>+++.++[----->+<]>+.------.-.-[->+++++<]>-.[-->+++++<]>--.[----->+++<]>-.--[--->+<]>-.+[->+++<]>++.+++++++++++.-------.<]<]>[>-[------->+<]>---.--[++++>---<]>-.---.-------.---.--[--->+<]>-.---[->+++<]>.++[->++++<]>+.++++.-.++++++.-------------.++.+++++.++++++++++++.+++[->+++<]>.+++++++++.<] (489 characters) |
| 6 |
United States → Santa Claus United Kingdom → Father Christmas Russia → Ded Moroz Netherlands → Sinterklaas Norway → Julenissen Finland → Joulupukki Germany → Weihnachtsmann | 2136 | ,>+>+++++++[-<<---------->>]<<[>+<-[>+<-------[>+<----[>>,,,,,,,>+>+++++[-<<--------------->>]<<[>>-[--->+<]>--.++++++++++++++.+++++++++++++.++++++.+[->+++<]>++.-[--->+<]>.+[->++<]>+.+[--->+<]>.-----------.--[--->+<]>.--.<<]>[>-[------->+<]>---.[------>+<]>.--[--->+<]>-.------------.---.+++++++++++++.[-->+++++<]>+++.+[->++<]>+.+[-->+++<]>++.++++++++++.---------.++++++++++.+.-------.------------.--[--->+<]>--.<]<<<]>[>++++[++++>---<]>+.[-->+++<]>-.-.-[--->+<]>-.++++++[->++<]>+.[--->+<]>.+++.---.-[--->+<]>.<]<]>[>,>+>++++++++++[-<<---------->>]<<-[>>-[------->+<]>+.-[----->+<]>.---------.-------.+++++++++.-----.++++++++++..++++[->+++<]>.+++++++++.<<]>[>-[--->+<]>--.+[---->+++++<]>.+++++.++++++.+++[->+++<]>.+++++++++++++.-------.+.-----------..--[--->+<]>--.<]<<]<[-]]>[>-[--->+<]>++.++[->++++<]>+.++++.-.++++++.-------------.++.+++++.++++++++++++.-.------.------------.+++++++++++++..<]<]>[>-[------->+<]>+.[-->+++<]>.++++++.---------.+++++++++.-----.+++++.----------..--.<] (982 characters) |
| 7 |
hey jude → beatles one → u2 smells like teen spirit → nirvana | 698 | ,>+>++++++++[-<<------------->>]<<[>+<-------[>>+[------->++<]>.-----.+++++++++.++++.[->+++<]>-.+++++++++++++.-------------.<<]>[>----[-->+++++<]>-.+[++>---<]>+.<]<]>[>--[----->+<]>----.+++.----.--[--->+<]>-.--------.-------.[--->+<]>----.<] (241 characters) |
| 8 |
what → contest where → 2026.andgein.ru when → 1 january 2026 | 1074 | ,,,>+>++++++++[-<<------------>>]<<-[>>,>+>++++++++++[-<<----------->>]<<[>>-[----->+<]>-.--.++.++++.--------.++[->++<]>+.+++++++++++++.----------.+++.--.++++.+++++.[----->++<]>++.[--->++<]>--.+++.<<]>[>-[----->+<]>--.-[--->++<]>.-[--->++<]>.---------.+++++++++++++.+++++++.[->+++<]>++.--[--->+<]>---.+++++++.-[---->+<]>++.[-->+++<]>++.--.++.++++.<]<<<]>[>--[----->+<]>---.++++++++++++.-.++++++.+++[->+++<]>.[--->+<]>----.+.<] (426 characters) |
| 9 |
18:00 → getting ready 21:00 → warm-up chatter 23:30 → countdown hype 00:00 → cheers and chaos 02:00 → philosophical conversations | 2428 | ,>+>++++++[-<<-------->>]<<[>+<-[>>,>+>+++++++[-<<------->>]<<[>>--[----->+<]>---.++++++++++++.++++++.-------.++++++.++[->+++<]>++.+++++++++++.++++++++.---------.-[->+++++<]>-.-[--->++<]>--.[--->+<]>+.---------.-----------.<<]>[>------[-->+++<]>.-[->+++<]>-.--[--->+<]>---.-----.+[----->++<]>+.+[--->++<]>+.-----.[------->++<]>.+[->+++<]>.+++++.-------.--[--->+<]>-..+++[->+++<]>.+++++++++++++.<]<<<]>[>+[----->+++<]>.--.[--->+<]>---..-----------.+++++.-------.-[--->+<]>--.---[----->++<]>.-------------.----.+++.+[--->+<]>++.<]<]>[>,>+>++++++[-<<-------->>]<<[>>+[------->++<]>++.--------.+.+++.+++.++++.----.+.--------.+.------.--.+++++++++++.[++>---<]>--.+[->+++<]>.++++++++++++.-.++++++++.+[->+++<]>.+++++++++++++.+.++[->+++<]>++.--[--->+<]>-.-----------.++++++.-.+++++.<<]>[>--[----->+<]>---.+++++.---..+++++++++++++.+.+[---->+<]>+++.[--->+<]>+.+++++++++++++.----------.-[--->+<]>-.+[->+++<]>.+++++.-------.++++++++++++++.++++.<]<<] (937 characters) |
| 10 |
january 1 → sleepy victory january 2 → mild denial january 3 → inbox shock january 4 → routine reboot january 5 → okay, new year mode on | 2473 | ,,,,,,,,,>+>+++++++[-<<------->>]<<[>+<-[>+<-[>+<-[>>+[------->++<]>+.----.----------.+[--->+<]>+++.-[-->+++++<]>.------------.+[----->+<]>+.---------.[--->+<]>.+[---->+<]>++.--[->++++<]>+.--[->+++<]>.----.--[--->+<]>---.[-->+++++<]>+++.+[----->+<]>.++.-----------.+.--[--->+<]>-.+++++[->+++<]>.-.<<]>[>+[--------->++<]>.---.++++++.-.-----------.+++++.---------.--[--->+<]>-.---[----->++<]>.-------------.---.+++++++++++++..+++++.<]<]>[>--[----->+<]>+++.+++++.------------.+++++++++++++.+++++++++.[---->+<]>++.---[->++++<]>-.-----------.+++++++.------------.++++++++.<]<]>[>+[------->++<]>-.----.+++.--------.-[--->+<]>-.+[->+++<]>+.+.+++++++++.-----.--------.+++++++++++.<]<]>[>+[--------->++<]>+.-------.-------..+++++++++++.+++++++++.-[---->+<]>++.--[->++++<]>--.[------>+<]>.------.-[--->+<]>--.-----.+++.+++++++.<] (819 characters) |
| 11 |
violin → string flute → woodwind trumpet → brass drum → percussion piano → keyboard | 1132 | ,>+>++++++++++[-<<---------->>]<<[>+<--[>+<----------[>+<----[>>+[--------->++<]>+.+.--.---------.+++++.-------.<<[-]]>[>--[----->+<]>----.[--->+<]>----.+++[->+++<]>++.--[--->+<]>--..<]<]>[>--[----->+<]>+++++.------.[--->+<]>++.---[->+++<]>.+++++++++++++.--------------.--[--->+<]>---.--------------.<]<]>[>------[-->+++<]>.--------..-----------.+[--->+<]>.+[->+++<]>+.+++++.----------.<]<]>[>+[------->++<]>++.-----------.+++++++++++++.++++[->+++<]>+.-[--->+<]>-.--..----------.++++++.-.<] (490 characters) |
| 12 |
mercury → 1 venus → 2 earth → 3 mars → 4 jupiter → 5 saturn → 6 uranus → 7 neptune → 8 | 588 | ,>+>++++++++++[-<<---------->>]<<-[>+<-----[>+<---[>+<-[>+<-----[>+<--[>>-[----->+<]>-.<<[-]]>[>-[----->+<]>++++.<]<[-]]>[>-[----->+<]>+++.<]<[-]]>[>-[----->+<]>+++++.<]<[-]]>[>,>+>++++++++[-<<------------>>]<<-[>>-[----->+<]>--.<<[-]]>[>-[----->+<]>+.<]<<[-]]<[-]]>[>-[----->+<]>++.<]<[-]]>[>-[----->+<]>.<] (308 characters) |
| 13 |
pawn → 1 knight → 3 bishop → 3 rook → 5 queen → 9 | 346 | ,>+>+++++++[-<<-------------->>]<<[>+<---------[>+<-----[>+<-[>>-[----->+<]>++.<<[-]]>[>+[--------->+<]>.<]<[-]]>[>-[----->+<]>--.<]<[-]]>[>-[----->+<]>.<]<[-]]>[>-[----->+<]>.<] (178 characters) |
| 14 |
a → alpha b → beta g → gamma d → delta e → epsilon z → zeta i → iota l → lambda o → omicron | 837 | ,>+>++++++++[-<<------------>>]<<-[>+<-[>+<--[>+<-[>+<--[>+<--[>+<---[>+<---[>>----[-->+++<]>.---[->+++<]>.[--->+<]>---.+[->+++<]>++.<<]>[>+[------->++<]>+.--.----.------.-[--->+<]>----.---.-.<]<]>[>+[------->++<]>--.-----------.++++++++++++.-----------.++.---.<]<[-]]>[>--[----->+<]>+++.++++++.+++++.+[->+++<]>++.<]<]>[>+[----->+++<]>.------.++++++++++++..------------.<]<[-]]>[>--[----->+<]>-.+++++++++++.+++.----------.+++.+++.-.<]<[-]]>[>--[----->+<]>--.+.+++++++.++++++++.+[->+++<]>++.<]<]>[>--[----->+<]>----.+++.[--->+<]>---.+[->+++<]>++.<]<]>[>--[----->+<]>-----.+++++++++++.++++.--------.-------.<] (607 characters) |
| 15 |
january → february february → march march → april april → may may → june june → july july → august august → september september → october october → november november → december december → january | 1451 | ,>+>++++++++[-<<------------>>]<<-[>+<---[>+<--[>+<----[>+<---[>+<-[>+<-[>>+[------->++<]>+.------------.-[--->+<]>--.-----.-------------.+++.+++++++++++++.<<]>[>+[------->++<]>.+.+++++++.+[->+++<]>.++++++++.-----------.+++.+++++++++++++.<]<]>[>--[----->+<]>--.+.--.++.++++++++.-----------.+++.+++++++++++++.<]<[-]]>[>,,>+>++++++++[-<<-------------->>]<<--[>>--[----->+<]>++++.+++++++++++.-------.---------.<<[-]]>[>--[----->+<]>-----.-[++>-----<]>.++.---------.+++.<]<<[-]]<[-]]>[>,>+>++++++++[-<<------------>>]<<-[>>,>+>+++++++++[-<<------------>>]<<[>>--[----->+<]>++++.+++++++++++.---------.-[--->+<]>.<<]>[>--[----->+<]>-----.--[--->+<]>.++[->+++<]>++.--[--->+<]>--.--.+.<]<<[-]<[-]]>[>--[----->+<]>.-.---.[--->+<]>----.+++.[->+++<]>++.--[--->+<]>---.+++++++.<]<<[-]]<[-]]>[>+[------->++<]>-.------------.--[--->+<]>---.++++[->+++<]>+.+++++.<]<]>[>--[----->+<]>++++.---------.+++++++++++++.+++++++.[->+++<]>++.--[--->+<]>---.+++++++.<]<]>[>,>+>++++++++[-<<-------------->>]<<[>>+[--------->++<]>+.++++[->+++<]>.+++++++++++.++++.+++[->+++<]>.++++++++.-----------.+++.+++++++++++++.<<]>[>+[------->++<]>-.------------.+[--->+<]>+++.<]<<[-]] (1144 characters) |
| 16 |
USD → United States EUR → Eurozone JPY → Japan GBP → United Kingdom AUD → Australia | 821 | ,>+>++++++++[-<<-------->>]<<-[>+<----[>+<--[>+<---[>>-[--->+<]>.--[--->+<]>---.-----.+++++++++++.+++[->+++<]>.-.-[--->+<]>-.----[->+++<]>-.[--->+<]>+++.+[->+++<]>++.--[--->+<]>-.+++[->+++<]>.[--->+<]>----.<<]>[>-[------->+<]>+.--[--->++++<]>+.-[++>-----<]>.[----->++<]>+.+++++++++++++.<]<]>[>-[--->+<]>.--[--->+<]>---.-----.+++++++++++.+++[->+++<]>.-.-[--->+<]>-.--[-->+++++<]>.-----[-->+++<]>.+++++.-------.---.+++++++++++.--.<]<]>[>++++[++++>---<]>++.-[----->+<]>+.---.---.-[--->+<]>.[->+++<]>+.-.---------.<]<]>[>----[---->+<]>++.------[->++<]>-.--.+.--.+++[->+++<]>++.+++++++++++.---.--------.<] (600 characters) |
| 17 |
banana → yellow strawberry → red kiwi → green blueberry → blue grape → purple | 478 | ,>+>+++++++[-<<-------------->>]<<[>+<-----[>+<----[>>+[--------->++<]>.-------------.-.<<[-]]>[>+[----->+++<]>.+++++++++++.-------------..+++++++++.<]<[-]]>[>+[------->++<]>++.+++++.---.--.----.-------.<]<[-]]>[>,>+>++++++++[-<<------------>>]<<-[>>--[----->+<]>----.++++++++++.+++++++++.++[->+++<]>.<<]>[>----[-->+++<]>-.--[->+++<]>.+++++++..+++.++++++++.<]<<[-]] (365 characters) |
| 18 |
Inception → 2010 The Matrix → 1999 Interstellar → 2014 Titanic → 1997 Parasite → 2019 | 370 | ,>+>++++++++[-<<--------->>]<<-[>+<-------[>>,>+>++++++++[-<<------------->>]<<[>>-[----->+<]>--.++++++++..--.<<[-]]>[>-[----->+<]>--.++++++++...<]<<[-]<[-]]>[>-[----->+<]>-.--.+.++++++++.<]<[-]]>[>,,>+>+++++++++[-<<----------->>]<<[>>-[----->+<]>-.--.+.+++.<<[-]]>[>-[----->+<]>-.--.+.-.<]<<[-]] (296 characters) |
| 19 |
AAPL → Apple MSFT → Microsoft GOOGL → Alphabet AMZN → Amazon TSLA → Tesla | 599 | ,>+>++++++++[-<<-------->>]<<-[>+<------[>+<------[>>-[--->+<]>-.-[----->+++<]>.[--->+<]>----.-------.-----------.<<]>[>++[---------->+<]>.+[--->++++<]>+.------.-[--->+<]>----.---.++++.----.---------.-[--->+<]>---.<]<]>[>----[---->+<]>++.[--->+<]>+.++++.--------.-------.+.+++.[--->+<]>---.<]<]>[>,>+>++++++++[-<<-------->>]<<-[>>----[---->+<]>++.[--->+<]>++.------------.+[----->+<]>.[->+++<]>+.-.<<]>[>----[---->+<]>++.-[++++>---<]>..----.-------.<]<<[-]] (457 characters) |
| 20 |
4 → tetrahedron 6 → cube 8 → octahedron 12 → dodecahedron 20 → icosahedron | 626 | ,>+>+++++++[-<<------->>]<<[>+<-[>+<--[>+<--[>>+[------->++<]>+.------------.-[--->+<]>--.+[->+++<]>++.+++++++.---.-.++++++++++++++.---.-.<<]>[>--[----->+<]>---.-[--->+<]>-.+[->+++<]>.+++.<]<]>[>--------[-->+++<]>.+++[->+++<]>.[--->+<]>---.--.+++[->+++<]>++.+++++++.---.-.++++++++++++++.---.-.<]<]>[>--[----->+<]>+++.------.++++++++++++.++++.++[->+++<]>++.+++++++.---.-.++++++++++++++.---.-.<]<]>[>--[----->+<]>--.+++++++++++.-----------.+.--.--.+++++++.---.-.++++++++++++++.---.-.<] (483 characters) |
Later levels could require a few more optimizations. Let’s go over the ones I used (you might not need them if you implemented the other parts more efficiently!).
1. When printing a string (for example, “contest”), you first need to produce byte 99 (the ASCII code for c),
then 111 (o), 110 (n), and so on. Obviously, you almost always want to reuse the same
cell, because if it already contains 111, getting 110 is easy — just subtract one,
which is a single instruction in Brainfuck. But how do you write the shortest program to get 111 from 99?
For that, let’s precompute, for every pair of bytes A and B, a reasonably short program that transforms
A into B. Start with the trivial programs — lots of “+” increments and “-” decrements.
Then use the fact that if you have a program that transforms A into C, and a program that transforms C into B, then their
concatenation transforms A into B. Finally, use simple multiplication. For example, [--->+++++++<]
multiplies a number by 7/3 — i.e., it maps 6 to 14 and 27 to 63.
By applying these operations, we’ll keep improving our programs as long as they keep getting shorter. Then we’ll use them both for printing strings and for subtracting before comparisons.
2. Sometimes the strings you need to print share the same prefix or the same suffix. Then you can save space by printing the common prefix/common suffix outside the branches.
3. Sometimes the general program-generation logic inserts zeroing loops [-], unnecessary shifts <>,
or other things that turn out not to be needed. Remove them at the very end, making sure the program still behaves as expected.
For that you’ll have to write a Brainfuck interpreter, but luckily it takes ten lines can be written by an LLM or imported from a library.
| # | Input → output | Max. length | Possible program |
|---|---|---|---|
| 21 |
lift → elevator lorry → truck boot → trunk petrol → gasoline biscuit → cookie | 481 | ,>+>+++++++[-<<-------------->>]<<[>+<----------[>>+[----->+++<]>.------.--[--->+<]>--.----.---.---.+++++.---------.<<]>[>,>+>+++++++[-<<--------------->>]<<[>>--------[-->+++<]>.--.+++.+[->+++<]>+.++++++++.<<]>[>--[----->+<]>-.+++++++.-------.[--->+<]>-.[->+++<]>-.--[--->+<]>-.-----.+++.<]<<[-]]<[-]]>[>,>+>+++++++[-<<--------------->>]<<[>>--------[-->+++<]>.--.+++.-------.---.<<[-]]>[>--[----->+<]>---.++++++++++++..----.--.----.<]<<[-]] (442 characters) |
| 22 |
New York → UTC-5 London → UTC+0 Tokyo → UTC+9 Sydney → UTC+10 Dubai → UTC+4 | 382 | -[--->+<]>.-.[----->+<]>-.,>+>++++++[-<<----------->>]<<--[>+<--------[>+<--[>+<-----[>>++[------>+<]>.++++++++++++++.<[-]<[-]]>[>++[------>+<]>.++++++.-.<[-]][-]<[-]]>[>++[------>+<]>++.++++++++.<[-]][-]<[-]]>[>++[------>+<]>.+++++.<[-]][-]<[-]]>[>++[------>+<]>.+++++++++.<[-]] (279 characters) |
| 23 |
32 F → 0 C 68 F → 20 C 86 F → 30 C 104 F → 40 C 14 F → -10 C | 356 | ,>+>+++++++[-<<------->>]<<[>+<--[>+<---[>>-[----->+<]>.<[-]<[-]]>[>-[----->+<]>-.<[-]][-]<[-]]>[[-]][-]<[-]]>[>,>+>++++++[-<<-------->>]<<[>>++[------>+<]>++.++++.<[-]<[-]]>[>-[----->+<]>+.<[-]]<<[-]]>>>>-[----->+<]>---.[--->++<]>.+[->++<]>+. (243 characters) |
| 24 |
hydrogen → 1 helium → 2 carbon → 6 oxygen → 8 iron → 26 copper → 29 zinc → 30 krypton → 36 silver → 47 tin → 50 iodine → 53 xenon → 54 gold → 79 mercury → 80 lead → 82 uranium → 92 plutonium → 94 | 853 | ,>+>+++++++++[-<<----------->>]<<[>+<----[>+<-[>+<-[>+<--[>+<-[>+<-[>+<--[>+<-[>+<---[>+<-[>+<-[>+<---[>>-[----->+<]>.---.<<[-]]>[>-[----->+<]>++.-.<]<[-]]>[>+[--------->+<]>.-------.<]<[-]]>[>-[----->+<]>++.-----.<]<[-]]>[>-[----->+<]>+.+++.<]<[-]]>[>+[--------->+<]>.-----.<]<[-]]>[>-[----->+<]>+++++.<]<[-]]>[>-[----->+<]>+++++.--------.<]<[-]]>[>-[----->+<]>+++++.------.<]<[-]]>[>-[----->+<]>.+++.<]<[-]]>[>,>+>++++++++++[-<<----------->>]<<-[>>-[----->+<]>-.++++.<<[-]]>[>-[----->+<]>++.--.<]<<[-]]<[-]]>[>,>+>++++++++++[-<<---------->>]<<-[>>-[----->+<]>--.<<[-]]>[>-[----->+<]>-.<]<<[-]]<[-]]>[>-[----->+<]>++++.++.<]<[-]]>[>,>+>++++++++[-<<------------>>]<<-[>>-[----->+<]>-.+++++++.<<[-]]>[>-[----->+<]>+++.<]<<[-]] (725 characters) |
| 25 |
H → Hydrogen He → Helium C → Carbon O → Oxygen Fe → Iron Cu → Copper Ag → Silver Au → Gold | 729 | ,>+>++++++++[-<<-------->>]<<-[>+<--[>+<---[>+<--[>>-[--->+<]>------.+[-->+++<]>.+.-[->+++<]>-.--.+++++++++.<<]>[>,>+<[>>-[------->+<]>-.-[->+++++<]>++.+++++++.---.++++++++++++.--------.<<]>[>-[------->+<]>-.[------->+<]>+.--[->+++<]>-.++++++++++++++.---.--------.--.+++++++++.<]<<[-]]<[-]]>[>-[------->+<]>.+[->+++++<]>.---.-.<]<]>[>,>+<[>>++++[++++>---<]>.+[--->+<]>+++.+..-----------.+++++++++++++.<<]>[>++++[++++>---<]>.-[-->+++<]>--.--[--->+<]>---.++++[->+++<]>.+++++++++++++.-.<]<<[-]]<[-]]>[>,>+>++++++++[-<<------------->>]<<+[>>-[------->+<]>--.[--->+<]>++.---.--------.<<]>[>-[--->+<]>--.+[---->+++++<]>.+++.++++++++++.+[->+++<]>.+++++++++++++.<]<<[-]] (662 characters) |
| 26 |
tennis → racket soccer → ball boxing → gloves archery → bow hockey → stick | 389 | ,>+>++++++++[-<<------------>>]<<-[>+<-[>+<------[>+<-----------[>>+[--------->++<]>.+++[->+++<]>++.++.++++++++.------.[--->+<]>---.<<]>[>--[----->+<]>----.-.+++++++++++..<]<[-]]>[>+[--------->++<]>+.+.-----------.------.++++++++.<]<[-]]>[>+[----->+++<]>.+++++.+++.+++++++.+[->+++<]>.[--->+<]>----.<]<]>[>--[----->+<]>----.+++++++++++++.++++++++.<] (348 characters) |
| 27 |
phoenix → greek kitsune → japanese anubis → egyptian kelpie → scottish | 475 | ,>+>++++++++[-<<------------>>]<<-[>+<----------[>>+[----->+++<]>.+++++++++++.-------------..++++++.<<[-]]>[>,>+>++++++++++[-<<---------->>]<<-[>>--[----->+<]>++++.---------.-[++>-----<]>.[----->++<]>+.+++++++++++++.---------.[--->+<]>----.++++[->+++<]>.<<]>[>+[--------->++<]>+.+++[->+++<]>+.++++++++++++.+++++..-----------.++++++++++.-----------.<]<<[-]]<]>[>--[----->+<]>-.++.+[--->+<]>+.---------.++++.-----------.--------.+++++++++++++.<] (443 characters) |
| 28 |
python → 1991 javascript → 1995 rust → 2010 go → 2009 | 226 | ,>+>++++++++[-<<------------->>]<<+[>+<---[>+<------[>>-[----->+<]>-.--.+.-.<<[-]]>[>-[----->+<]>--.++++++++..--------.<]<[-]]>[>-[----->+<]>--.++++++++..----.<]<[-]]>[>-[----->+<]>-.--..+++++++++.<] (199 characters) |
| 29 |
python → snake go → gopher rust → gear cog java → steaming coffee cup javascript → yellow JS badge | 632 | ,>+>++++++++[-<<------------->>]<<+[>+<---[>+<------[>>+[----->+++<]>.--.----.--[--->+<]>---.[-->+++++<]>+++.+[->+++<]>.++++++++++++.--------.<<]>[>+[--------->++<]>+.-----.-------------.++++++++++.------.<]<[-]]>[>,,,,>+<[>>----[-->+++<]>-.--[->+++<]>.+++++++..+++.++++++++.+[---->+<]>++.+++++[->++<]>.+++++++++.+[--->+<]>++++.[--->+<]>++.-.+++.+++.--.<<]>[>+[--------->++<]>+.+.+++[->+++<]>.----.++++++++++++.----.+++++.-------.-[--->+<]>--.+[->+++<]>.++++++++++++.---------..-..--[--->+<]>-.+[->+++<]>.-[--->+<]>-.-----.<]<<]<]>[>+[----->+++<]>.++++++++.+.--------.---.+++++++++++++.<] (588 characters) |
| 30 |
Gryffindor → bravery Hufflepuff → loyalty Ravenclaw → wisdom Slytherin → ambition | 431 | ,>+>+++++++[-<<---------->>]<<-[>+<-[>+<----------[>>--[----->+<]>-----.++++++++++++.-----------.+++++++.+++++++++++.-----------.++++++.-.<<[-]]>[>------[-->+++<]>.+[->+++<]>+.++++++++++.+++[->+++<]>++.+++++++++++.--.<]<]>[>+[------->++<]>--.+++.++++++++++.---[->+++<]>-.+++++++++++.++++++++.+++++.<]<]>[>--[----->+<]>----.[--->+<]>----.+++[->+++<]>++.+[--->+<]>.+[->+++<]>.+++++++++++++.+++++++.<] (398 characters) |
| 31 |
pi → 3.14159 e → 2.71828 phi → 1.61803 tau → 6.28318 | 348 | ,>+>++++++++++[-<<---------->>]<<-[>+<-----------[>>-[----->+<]>+++.--------.++++.++++++.-----.--.+++++++.<<[-]]>[>,>+>++++++++[-<<------------->>]<<[>>-[----->+<]>.-----.+++.+++.---.++++.++++.<<[-]]>[>-[----->+<]>--.---.++++++++.-----.+++++++.--------.+++.<]<<[-]]<[-]]>[>-[----->+<]>-.----.+++++++++.------.+++++++.------.++++++.<] (333 characters) |
| 32 |
.jpg → photograph .png → picture .svg → vector image .wav → audio .epub → ebook .yaml → config .md → markdown text .csv → comma-separated values .mp4 → video .ttf → font .ico → icon | 1242 | ,,>+>+++++++++[-<<----------->>]<<[>+<--[>+<----[>+<-[>+<---[>+<---[>+<---[>+<-[>+<---[>>--[----->+<]>---.++++++++++++.-.--------.+++.--.<<[-]]>[>--[----->+<]>-----.--[--->+<]>.+[->+++<]>++.+++++.++++++.<]<]>[>--[----->+<]>.+++++++++.-.++++++.<]<[-]]>[>----[-->+++++<]>.+[->+++<]>.--.-[--->+<]>--.-----.+++.[-->+++++<]>+++.-[--->++<]>-.++++.------------.++++++.--.<]<]>[>+[------->++<]>++.-------.------.-[--->+<]>--.+.---.-------------.<]<]>[>,>+>++++++++++[-<<---------->>]<<[>>----[-->+++++<]>.[------>+<]>.-----.+.++++++++++.<<]>[>+[------->++<]>-.------------.--[--->+<]>---.-------.-------.+++++++++++.++++++++.---------.-[->+++++<]>-.---[->++++<]>.+++[->+++<]>.[--->+<]>+.----.<]<<[-]]<[-]]>[>+[------->++<]>++.--------.+++++++.+++++.-----.--------.+++++++++++.+++[->+++<]>++.-[++>-----<]>.--------.<]<]>[>--[----->+<]>+++.------.++++++++++++.-.<]<[-]]>[>--[----->+<]>-.---.+++++++++++++..----.<]<[-]]>[>--[----->+<]>---.++++++++++++.--..------------.-[-->+<]>---.+[--->++<]>-.++++[->+++<]>.+++++++++++.[----->++<]>+.--[--->+<]>---.+++[->+++<]>++.--[--->+<]>-.+++[->+++<]>.-.-[--->+<]>-.--[->++++<]>--.[->+++<]>-.+++++++++++.+++++++++.++[->+++<]>.[--->+<]>----.<] (1170 characters) |
| 33 |
triangle → 3 square → 4 pentagon → 5 hexagon → 6 | 163 | ,>+>++++++++[-<<------------->>]<<[>+<--------[>+<---[>>-[----->+<]>.<<[-]]>[>-[----->+<]>+.<]<[-]]>[>-[----->+<]>++.<]<[-]]>[>-[----->+<]>+++.<] (145 characters) |
| 34 |
3 → triangle 4 → square 5 → pentagon 6 → hexagon | 376 | ,>+>+++++[-<<---------->>]<<-[>+<-[>+<-[>>--[----->+<]>++.---.[--->+<]>+.--[->+++<]>-.++++++.++++++++.-.<<]>[>+[------->++<]>++.-----------.+++++++++.++++++.+[->+++<]>++.++++++.++++++++.-.<]<]>[>+[--------->++<]>+.--.++++.[->+++<]>++.--[--->+<]>---.-------------.<]<]>[>--------[-->+++<]>.--.---------.--------.+++++++++++++.-------.+++++.-------.<] (349 characters) |
| 35 |
200 → OK 201 → Created 204 → No Content 301 → Moved Permanently 302 → Found 400 → Bad Request 401 → Unauthorized 403 → Forbidden 404 → Not Found 500 → Server Error 502 → Bad Gateway 503 → Service Unavailable | 1692 | ,>+>+++++[-<<---------->>]<<[>+<-[>+<-[>>,,>+>++++++[-<<-------->>]<<[>+<--[>>-[--->+<]>--.[----->+++<]>.+++++++++++++.++++.[------>+<]>.------.++.--[--->+<]>-.----[->+++<]>+.--[--->+<]>---.-------------.+[--->+<]>.[->+++<]>-.++++++++.+++.-----------.+.++++++++++.-------.<<]>[>----[---->+<]>+++.[-->+++<]>--.+++.-[--->+<]>-.+++[->++<]>+.-[------>+<]>.--[--->+<]>-.+++[->+++<]>.[--->+<]>.-[->+++<]>-.+[--->+<]>+++.<]<]>[>-[--->+<]>--.[----->+++<]>.+++++++++++++.++++.+[->+++<]>.+++++++++++++.[-->+++++<]>+++.++[->++<]>+.-[++++>---<]>-..---.+++.<]<<<]>[>,,>+>++++++[-<<-------->>]<<[>+<-[>+<--[>>-[--->+<]>-------.-[--->+<]>.+++++.[---->+<]>+++.+++[->++<]>.+[--->+<]>++.++++++.-------.----------.<<]>[>-[------->+<]>---.+[--->+<]>++.+++.++++[->+++<]>.+++++++.-----..+.+++++++++.<]<]>[>-[--->+<]>.--[--->+<]>---.-------------.--[--->+<]>.-.------------.+++++++.+++.---------.-[--->+<]>++.---[->+++<]>.-.<]<]>[>----[---->+<]>+++.[-->+++<]>--.+++.-[--->+<]>-.[-->+++++<]>++.+[----->+++<]>.++++++++++++.++++.++[->+++<]>.[--->+<]>----.+.<]<<]<[-]]>[>,,>+>+++++++[-<<------->>]<<[>>-[------->+<]>---.+[--->+<]>++.++++++.-------.----------.<<]>[>++[---------->+<]>.[--->+<]>.+++++++.+[->+++<]>.-.-[--->+<]>-.[-->+++++<]>.[---->+++++<]>+.+++++++++++++.-----.------------.+++++++++++++.---------.+++++++++.++++++.--------.-[--->+<]>.<]<<[-]]<[-]]>[>,,>+>++++++[-<<-------->>]<<[>+<-[>>-[--->+<]>-------.-[--->+<]>.[--->+<]>-----.+[->++<]>+.+[--->+<]>+++.-.++++++.+++[->+++<]>.+++++++++.++++++.<<]>[>++++[++++>---<]>.+[++++>---<]>-.-------------.----.--[--->+<]>-.+++[->+++<]>.-.<]<]>[>-[--->+<]>------.----.<]<<] (1602 characters) |
| 36 |
monet → impressionism picasso → cubism kahlo → surrealism van gogh → post-impressionism dali → surrealism kandinsky → abstract pollock → abstract expressionism cezanne → post-impressionism rothko → color field hopper → realism | 1338 | ,>+>+++++++++[-<<----------->>]<<[>+<-[>+<----[>+<---[>+<--[>+<---[>+<--[>>+[------->++<]>++.-.++++.+.[++>---<]>-.[--->+++++++<]>.++++.+++.++.-------------.[--->+<]>----..----------.++++++.-.-----.++++++++++.------.<<]>[>--[----->+<]>---.++++++++++++.---.+++.+++.[-->+++++<]>+++.++[->+++<]>.+++.----.+++++++.--------.<]<]>[>,>+>+++++++[-<<--------------->>]<<[>>--[----->+<]>-----.+.[--->+<]>---.+.--.+++[->+++<]>++.++.-[--->+<]>--.[---->+<]>+++.+[->+++<]>++.[--->+<]>+.--------.++.-------------.[--->+<]>----..----------.++++++.-.-----.++++++++++.------.<<]>[>--[----->+<]>---.-[--->+<]>-.+[->+++<]>.+++++++.++++++++++.------.<]<<]<[-]]>[>--[----->+<]>+++.++++.+++.++.-------------.[--->+<]>----..----------.++++++.-.-----.++++++++++.------.<]<]>[>,,>+>++++++++[-<<------------->>]<<[>>--[----->+<]>-----.+.[--->+<]>---.+.--.+++[->+++<]>++.++.-[--->+<]>--.<<]>[>+[--------->++<]>+.++.---..-------------.----.+++++++++++.---.++++++++++.------.<]<<]<[-]]>[>+[--------->++<]>.-------------.----.+++++++++++.---.++++++++++.------.<]<[-]]>[>+[--------->++<]>+.++.---..-------------.----.+++++++++++.---.++++++++++.------.<]<[-]]>[>+[------->++<]>++.-.++++.+.[++>---<]>-.[--->+++++++<]>.++++.+++.++.-------------.[--->+<]>----..----------.++++++.-.-----.++++++++++.------.<] (1269 characters) |
| 37 |
voyager 1 → interstellar cassini → saturn new horizons → pluto | 292 | ,>+>+++++++++[-<<----------->>]<<[>+<-----------[>>--[----->+<]>+++.+++++.++++++.+++[->+++<]>.+++++++++++++.+.+.+++[->+++<]>.+++++++..-----------.--[--->+<]>---.<<]>[>+[------->++<]>++.----.+++++++++.-.-----.<]<[-]]>[>+[--------->++<]>+.++[->+++<]>++.--[--->+<]>-.+.---.----.<] (277 characters) |
| 38 |
AA → 1.5V AAA → 1.5V 9V → 9V CR2032 → 3V | 247 | ,>+>+++++++[-<<-------->>]<<-[>+<--------[>>-[----->+<]>.<[-]<[-]]>[>-[----->+<]>--.---.+++++++.<[-]][-]<[-]]>[>+[--------->+<]>.<[-]]>>>>+[--->++<]>. (150 characters) |
| 39 |
hearts → red diamonds → red clubs → black spades → black | 272 | ,>+>+++++++++[-<<----------->>]<<[>+<-[>+<----[>>--[----->+<]>----.++++++++++.-----------.++.++++++++.<<[-]]>[>+[--------->++<]>.-------------.-.<]<[-]]>[>+[--------->++<]>.-------------.-.<]<[-]]>[>--[----->+<]>----.++++++++++.-----------.++.++++++++.<] (254 characters) |
| 40 |
tokyo → mega vienna → large reykjavik → small new york → mega shanghai → mega berlin → large lisbon → medium zurich → medium oslo → small | 658 | ,>+>+++++++[-<<-------------->>]<<[>+<----------[>+<--[>+<-[>+<---[>+<-[>+<-[>+<--[>>+[------->++<]>-.--------.-.+++++.++++++++++++.--------.<<[-]]>[>+[------->++<]>--.-----------.--[--->+<]>---.-----------.--.<]<]>[>+[------->++<]>-.--------.++.------.<]<[-]]>[>+[------->++<]>-.--------.++.------.<]<[-]]>[>+[--------->++<]>+.------.------------.+++++++++++..<]<[-]]>[>+[--------->++<]>+.------.------------.+++++++++++..<]<[-]]>[>+[------->++<]>-.--------.++.------.<]<[-]]>[>+[------->++<]>-.--------.-.+++++.++++++++++++.--------.<]<[-]]>[>+[------->++<]>--.-----------.--[--->+<]>---.-----------.--.<] (607 characters) |
| 41 |
baguette → france naan → india pita → middle east focaccia → italy tortilla → mexico brioche → france injera → ethiopia pretzel → germany | 821 | ,>+>+++++++[-<<-------------->>]<<[>+<----[>+<---[>+<-----[>+<--[>>+[------->++<]>-.--------.[--->+<]>+.[->+++<]>+.------.++++++++++++.<<]>[>,>+>+++++++[-<<--------------->>]<<[>>+[----->+++<]>.--.+++++++++++++.-----.------------.+++++++++++++.[--->+<]>-.<<]>[>+[------->++<]>-.----.-----..++++++++.-------.--[--->+<]>-.+[->+++<]>++.----.--[--->+<]>--.+.<]<<[-]]<[-]]>[>--[----->+<]>+++.+++++.----------.+++++.--------.<]<[-]]>[>--[----->+<]>-.[--->+<]>---.------------.+.++++++.+.-------.--------.<]<]>[>--[----->+<]>+++.+++++++++++.+[->+++<]>++.+++++++++++.-[--->+<]>.<]<]>[>--[----->+<]>.++++++++++++.+++[->+++<]>++.+++++++++++++.-----------.++.<] (650 characters) |
| 42 |
heart → circulatory lungs → respiratory kidneys → urinary liver → digestive stomach → digestive pancreas → endocrine brain → nervous skin → integumentary spleen → lymphatic | 1066 | ,>+>+++++++[-<<-------------->>]<<[>+<------[>+<---[>+<-[>+<----[>>,>+>+++++++++[-<<------------>>]<<+[>+<-----[>>--[----->+<]>--.+++++.--.--.[--->+<]>----.+.-----------.[->++++++<]>.+[->+++<]>.<<]>[>+[------->++<]>--.-[--->+<]>.[->+++<]>++.+++.--------.-------.--[--->+<]>-.-----------.------.<]<]>[>--[----->+<]>+++.+++++.++++++.+++[->+++<]>.++.--[--->+<]>--.--------.--------.+++++++++.++++++.+[->+++<]>++.--[--->+<]>---.+++++++.<]<<<]>[>--[----->+<]>-.+++++++++.----------.+++++++++++.------------.-[--->+<]>----.---------.+++++.---------.<]<]>[>,>+>+++++++[-<<--------------->>]<<[>>+[--------->++<]>.-------------.[--->+<]>----.---.-------.+++++++++.+++[->+++<]>++.--[--->+<]>-.-----.+++.+++++++.<<]>[>--[----->+<]>--.+++++.--.--.[--->+<]>----.+.-----------.[->++++++<]>.+[->+++<]>.<]<<]<]>[>----[-->+++++<]>-.---.---------.+++++.-------------.--[--->+<]>---.+++++++.<]<]>[>--[----->+<]>---.++++++.+++++++++.++++[->+++<]>+.-[--->+<]>-.---------.-----------.--[--->+<]>-.-----.+++.+++++++.<]<]>[>+[------->++<]>.---------.+++++++++++++.++++.-------.++++++.--.<] (1066 characters) |
| 43 |
+ → add - → subtract * → multiply / → divide | 305 | ,>+>++++++[-<<------->>]<<[>+<-[>+<--[>>--[----->+<]>--.+++++.[->++++++<]>.[------>+<]>.-----.+.<<]>[>+[--------->++<]>+.++.+[->+++<]>.[--->+<]>--.--.+++[->+++<]>++.++.-[--->+<]>--.<]<]>[>--[----->+<]>-----.+++..<]<[-]]>[>+[------->++<]>-.++++++++.---------.++++++++.-----------.+++++++.----.-[--->+<]>.<] (305 characters) |
| 44 |
titan → saturn ganymede → jupiter triton → neptune enceladus → saturn charon → pluto phobos → mars deimos → mars | 552 | ,>+>+++++++++[-<<----------->>]<<[>+<-[>+<-[>+<--[>+<---------[>>,>+>+++++++[-<<--------------->>]<<[>>+[------->++<]>.---------.+++++++++++.++++.+.-------.---------.<<[-]]>[>+[--------->++<]>+.++[->+++<]>++.--[--->+<]>-.+.---.----.<]<<[-]<[-]]>[>+[------->++<]>-.------------.--[--->+<]>---.+.<]<]>[>--[----->+<]>++++.+++++++++++.-----.-------.+++++++++++.+++[->+++<]>.+++++++++++++.<]<]>[>+[--------->++<]>+.++[->+++<]>++.--[--->+<]>-.+.---.----.<]<]>[>+[------->++<]>-.------------.--[--->+<]>---.+.<]<]>[>+[------->++<]>++.----.+++++++++.-.-----.<] (552 characters) |
| 45 |
git status → what changed? git add → remember this git commit → lock in a snapshot git push → send it away git pull → get latest from others | 978 | ,,,,,>+>++++++++[-<<------------>>]<<-[>+<--[>+<-------------[>>------[-->+++<]>.+[->+++<]>.-------.--[--->+<]>-.[---->+<]>+++.+[->+++<]>.+++++.-------.+++++++++++++.-------.--.-.-[--->++<]>---.<<]>[>,,>+>+++++++++[-<<------------>>]<<[>>+[--------->++<]>+.++++[->+++<]>.+++++++++.----------.-[--->+<]>-.-[--->++<]>-.+++++++++++.[---->+<]>+++.[--->+<]>+.+[--->+<]>+.-[->+++<]>-.+[--->+<]>+++.<<]>[>+[----->+++<]>.--.[--->+<]>---.[---->+<]>+++.++[--->++<]>.-----------.--[--->+<]>-.+++[->+++<]>.[--->+<]>----.+.[---->+<]>+++.++[->+++<]>.++++++++++++.---.--.[->+++++<]>-.+++++[->+++<]>.+++++.------------.---.+++++++++++++.+.<]<<]<]>[>+[------->++<]>--.+++.------------.++++++++.-[++>---<]>+.-[--->++<]>-.+++++.-[->+++++<]>-.[--->+<]>+.-[--->+<]>.---[->++++<]>-.-----.-------------.-[++>-----<]>.+++.-----------.+++++++.+++++.<]<]>[>+[--------->++<]>.-------------.++++++++.--------.++++++++.-----------.+++.+++++++++++++.[-->+++++<]>+++.---[->++++<]>.------------.+.++++++++++.<] (978 characters) |
| 46 |
greenland → atlantic madagascar → indian fiji → pacific iceland → atlantic sri lanka → indian hawaii → pacific new guinea → pacific sumatra → indian canary islands → atlantic | 703 | ,>+>+++++++++[-<<----------->>]<<[>+<---[>+<-[>+<-[>+<-[>+<----[>+<-[>>--[----->+<]>+++.+++++.----------.+++++.--------.+++++++++++++.<<[-]]>[>+[------->++<]>++.[----->++<]>+.++.++++++.---.+++.------.<]<]>[>--[----->+<]>+++.+++++.----------.+++++.--------.+++++++++++++.<]<[-]]>[>--[----->+<]>-----.--[--->+<]>-.--------.-----------.+++++++++++++.++++++.-----------.------.<]<]>[>+[------->++<]>++.[----->++<]>+.++.++++++.---.+++.------.<]<]>[>--[----->+<]>-----.--[--->+<]>-.--------.-----------.+++++++++++++.++++++.-----------.------.<]<]>[>+[------->++<]>++.[----->++<]>+.++.++++++.---.+++.------.<]<]>[>--[----->+<]>-----.--[--->+<]>-.--------.-----------.+++++++++++++.++++++.-----------.------.<] (703 characters) |
| 47 |
cerulean → #007BA7 vermillion → #E34234 chartreuse → #7FFF00 ultramarine → #3F00FF crimson → #DC143C indigo → #4B0082 turquoise → #40E0D0 gold → #FFD700 salmon → #FA8072 magenta → #FF00FF | 823 | --[------->++<]>-.,>+>+++++++++[-<<----------->>]<<[>+<----[>+<--[>+<----[>+<------[>+<-[>+<-[>>++++[++++>---<]>++.-[---->+++<]>.+.--.+.+.<[-]<[-]]>[>-[----->+<]>.[--->++++<]>++.++[--->++<]>..[-->+++<]>--..<[-]][-]<[-]]>[>-[----->+<]>+.----.--[-->+++<]>.[--->++<]>++.--[-->+++<]>-.+[--->++<]>++.<[-]][-]<[-]]>[>-[------->+<]>---.-----.---------.--------.+++++++.-----.<[-]][-]<[-]]>[>-[------->+<]>---..++[--->++<]>..[-->+++<]>--..<[-]][-]<[-]]>[>-[----->+<]>+.++++++++++++++.[--->++<]>++++..++++++++.------.<[-]][-]<[-]]>[>-[------->+<]>---..--.-------------.-------..<[-]][-]<[-]]>[>,>+>++++++++++[-<<---------->>]<<-[>+<---[>>++++[++++>---<]>+.-.++[--->++<]>+++.+++.-.[--->++++<]>-.<[-]<[-]]>[>-[----->+<]>++++.+++++++++++++++...++[--->++<]>..<[-]][-]<[-]]>[>-[----->+<]>---..+++++++.+++++++++++.-.----------.<[-]]<<[-]] (823 characters) |
| 48 |
( → )
) → (
[ → ]
] → [
{ → }
} → {
> → <
< → >
| 322 | ,>+>+++++[-<<-------->>]<<[>+<-[>+>+++[-<<------>>]<<-[>+<--[>+>++++[-<<------->>]<<-[>+<--[>+>+++++[-<<------>>]<<[>>--[-->+++++<]>.<<[-]]>[>--[-->+++<]>.<]<[-]]>[>-[--->+<]>++++++.<]<[-]]>[>-[--->+<]>++++++++.<]<[-]]>[>----[---->+<]>---.<]<[-]]>[>----[---->+<]>-.<]<[-]]>[>++[------>+<]>---.<]<[-]]>[>++[------>+<]>--.<] (322 characters) |
| 49 |
Hippogriff → XXX Acromantula → XXXX Phoenix → XXXX Niffler → XXX Basilisk → XXXX Chinese Fireball → XXXXX Gnome → XX | 265 | -[--->+<]>+++..,>+>++++++++[-<<-------->>]<<-[>+<-[>+<-[>+<----[>+<-[>+<------[>>-[--->+<]>+++..<[-]<[-]]>[>-[--->+<]>+++.<[-]][-]<[-]]>[>-[--->+<]>+++.<[-]][-]<[-]]>[[-]][-]<[-]]>[>-[--->+<]>+++...<[-]][-]<[-]]>[>-[--->+<]>+++..<[-]][-]<[-]]>[>-[--->+<]>+++..<[-]] (265 characters) |
| 50 |
2+2 → 4 2*2 → 4 3+3 → 6 3*3 → 9 4+4 → 8 4*4 → 16 | 231 | ,>+>+++++[-<<---------->>]<<[>+<-[>>,>+>++++++[-<<------->>]<<[>>-[----->+<]>+++++.<<[-]]>[>-[----->+<]>--.+++++.<]<<[-]<[-]]>[>,>+>++++++[-<<------->>]<<[>>-[----->+<]>+++.<<[-]]>[>+[--------->+<]>.<]<<[-]]<[-]]>[>-[----->+<]>+.<] (231 characters) |
Note: on every level you can write an even shorter program — the answers above aren’t the limit!
In this task, you just had to detect and count LEGO® minifigures in images like this:
First, the task could be solved by hand! By my estimates it should have taken two to three hours, but it seems some teams got good enough to do it faster :-) Next, let’s talk about an automated solution.
Generally, it doesn’t look too hard — you just need to build a small object-detection pipeline. A significant number of first levels contained nothing but LEGO minifigures, so if you learned how to separate them from the background, you could already score a solid number of coins.
However, later on the minifigures appeared together with other toys, so you’d want to tell them apart. There weren’t that many different figures overall, so you could try writing code to automatically cut them out from the background and rotate them, and then manually label which ones are minifigures and which aren’t.
Or you could take a LEGO minifigure dataset and train a detector specifically for that kind of object. For example, this dataset detects all the figures well except the skeleton, which it recognizes only about 50% of the time.
You could pick any suitable model for object-class detection. I chose YOLOv8, and thankfully, in modern frameworks training can be done in three lines:
from ultralytics import YOLO
model = YOLO('yolov8n.pt')
dataset_yaml_path = "path/to/lego/dataset/data.yaml"
results = model.train(data=dataset_yaml_path, epochs=100, imgsz=640)
print("Training Complete!")
print("Your new .pt file is located in the 'runs' folder created in this directory.")
print("Look for: runs/detect/train/weights/best.pt")
What should you train the model on? You can do it on a modern CPU, but to stay within the contest’s limited time, I rented a virtual server with a fairly basic GPU for this kind of work (an RTX 4000 Ada) and trained the model in under $1 per hour. For even more speed, you could use something like an H100 or H200 — on such a small dataset they should finish in minutes.
Then you just need to build the pipeline correctly:
model.predict(...) with the right parameters.
For example, I recommend agnostic_nms=True, imgsz=2048, and iou=0.5.
If you’re also using YOLO, read more about the parameters in the documentation.
The PNG file was split into equal-sized chunks (for example, 4713 bytes each), and the chunks were shuffled. Reconstruct the correct order of the chunks and see what’s shown in the image.
It turns out the image can be reconstructed uniquely, even if the number of chunks is fairly large! Let’s start with the case where there aren’t many chunks. In that case you can simply try all possible permutations and keep the ones that produce a valid PNG file.
| # | No. of pieces | Question | Restored image |
|---|---|---|---|
| 1 | 3 | How many birds are on the wire? | ![]() |
| 2 | 4 | How many cars are preparing for the race? | ![]() |
| 3 | 5 | What's a title of this famous book? | ![]() |
| 4 | 8 | How many fish are in the aquarium? | ![]() |
In the next levels, the number of chunks increases to 18, 38, and even 113, and brute-forcing all permutations is no longer feasible. However, it’s enough to remember that a PNG file consists of chunks, each of which contains a CRC32 checksum. If a chunk happens to lie across the boundary between two pieces of our split file, then you can quickly tell whether those two pieces can be adjacent — just check that the checksum for the chunk is correct.
Let’s run a backtracking search, which will try to append some piece to the already glued-together beginning of the file. Starting the file is easy — in the first piece there must be the PNG header (eight fixed bytes) and the IHDR chunk, which among other things contains the image dimensions in pixels. We enumerate candidates for the next piece and check the checksum of the chunk that crosses the boundary. If it matches, then with high probability this is the correct next piece; we can continue, then continue further, and so on, until the image is fully reconstructed.
| # | No. of pieces | Question | Restored image |
|---|---|---|---|
| 5 | 18 | How many donuts are on a plate? | ![]() |
| 6 | 36 | How many clouds are in the sky? | ![]() |
| 7 | 38 | How many slices of pizza weren't eaten? | ![]() |
| 8 | 73 | How many chairs are on the image? | ![]() |
| 9 | 113 | How many eyes does the robot have? | ![]() |
But what if a single chunk spans several pieces? Then you’d have to brute-force multiple pieces at once to assemble one chunk and verify its checksum — and that’s something we can’t afford anymore...
In that case, reading pixel data directly from the IDAT chunks helps. The thing is, if you glue the pieces together in the wrong order, the image will still decompress correctly (at least until we reach the end of the chunk and check the CRC), but it will look something like this:
Notice the bottom rows of pixels — that’s where we glued on the wrong piece! The presence of this kind of “noise” can be detected automatically, and you can use it to discard the corresponding piece.
| # | No. of pieces | Question | Restored image |
|---|---|---|---|
| 10 | 30 | How many blue carriages are on a train? | ![]() |
| 11 | 269 | How many fire blocks are on the image? | ![]() |
| 12 | 398 | How many candles are on the cake? | ![]() |
| 13 | 537 | How many buttons does the snowman have? | ![]() |
| 14 | 356 | How many cups are on the table? | ![]() |
| 15 | 567 | How many steps are on the staircase? | ![]() |
It’s important to note that on many levels you don’t need to reconstruct the entire image — restoring half or two thirds is enough. If you occasionally save the part of the image you’ve already reconstructed during the search, you can get the answer much earlier.
Please do not submit the answer you’ve seen under your own name.
If you want to keep solving the tasks yourself, close the popup and don’t look at the answers.