Tags: modular-arithmetic logic math
Rating:
Here's the idea:
In order to force the computer to choose 83, we need to get to 82.
In order to get to 82, we need to ensure that the computer always chooses a number between 76 and 81, inclusive.
In order to force this, we need to choose 75.
We can use the following logic to essentially set up a pattern that we always need to choose a number that == 5 % 7.
Every time we choose this, the computer will always be forced to choose a number that is not 5 % 7. At minimum, it must choose increment the number by 1, i.e. make it 6 % 7. We can get from 6 % 7 back to 5 % 7. Therefore, we are always able to get back to 5 % 7, regardless of the bot's choice.
Hence, by continuously choosing values that are 5 % 7, we can get the flag!
UDCTF{minecr4ft_intern3t_g4ming}