Challenge :
\$\pi\$ is supposed to be infinite. That means every number is contained inside the decimal part of \$\pi\$. Your task will be to take a positive integer on input and return the position of this number in \$\pi\$ digits on output.
For example, if the input is 59
, we'll return 4
Here is why : we will look for the number 59
in the digits of \$\pi\$
3.14159265...
^^
The value starts at the 4th digit, so the output will be 4
.
Some other examples :
input : 1 output : 1
input : 65 output : 7
input : 93993 output : 42
input : 3 output : 9
Rules :
- You don't have to handle digits that doesn't exist within the first 200 digits
- Standard loopholes are, as always, forbidden.
- This is codegolf, so the fewer bytes wins.
n
'th index? So the text cases would return0, 6, 41, 8
instead of1, 7, 42, 9
. \$\endgroup\$