Octave, 17 bytes, 10 numbers, by flawr
From
_od(3_13_13_7_1_)
To the original code:
mod(3113+1387,11) #1
The rest of the numbers:
mod(3113+1388,11) #2
mod(3113+1389,11) #3
mod(3114+1389,11) #4
mod(3115+1389,11) #5
mod(3116+1389,11) #6
mod(3117+1389,11) #7
mod(3118+1389,11) #8
mod(3119+1389,11) #9
mod(3119+1379,11) #10
Try it online! for the first case
Explanation
mod(x, y)
computes the modulo of x and y. Here is the docs for mod
.
Process
I don't know Octave, I've never used it, but I was interested in this particular sumbission. So I decided to try to crack it. First, I used this website to help me find an Octave command that is three characters long and has an od
in the end. I found it to be mod
. Then I began experimenting with the numbers in its online interpreter. After some time, I ended up with
mod(3_13+13_7,1_)
after which time I decided to create a python script (on TIOv2!) to brute-force the solution. The script printed the values for the _
whenever first_param%second_param==1
. I first ran the python script for 10
(the second paramter to the mod
function). I got tons of hits. Then I ran it again for 11
. I got only a few hits this time, after which I decided to use 11
as the second parameter and the following values for the first parameter 3113+1387
just out of randomness. Now I got the original code. From there, I began incrementing the last digit of the numbers, so that I did 1387->1388->1389
and then 3113->3114->3115->3116->3117->3118->3119
. Now I got the first 9
numbers.
mod(3119+1389,11) #evaluates to 9
Now 10
was the only one remaining. I tried changing the 1389
to 1399
to see if it becomes 10
, but instead it resulted to 8
. So I changed it to 1379
, and it resulted in 10!