Hello Koders ,
Bc nobody made today’s Daily Challenge, I thought to make it by myself.
Your task for today is to make a procedure which gets one input and has one output.
input (number) will be taken as index for:
output (number) will be the digit (only one) number in this list:
12345678910111213141516... and so on…
The real challenge is today, to make the list so long that it is as long as the
I hope you understood, this idea came to me from a math book for nerds
EDIT: Forgot to say, for proof of functionality, use these inputs:
10, 25, 0 and 1,000,000.
I have already had my solution in my head, but I can’t use my computer now (have to wait like 9 hours) . I cant be as early as I can
Well, don’t be
I will post my solution tomorrow though.
So the output would be a single number or list?
Like for example if input : 11 then will the output be
0 or 12345678910?
Yes, you’re right. Self-answered!
Also you should see my examples…
I asked because I got confused between this two of your statements
Hey check this out.
For this to get to work just provide any number using the text box and when button is clicked label1 text will be set to the number you are looking for.
This text will be blurred
Please add a spoiler or hide details immediately. Ok you add it.
Btw, my solutions
Without using list (22 blocks)
(For me, it is the best solution among all my solutions)
With list (23 blocks)
With list (optimized, less lag than the upper one) (25 blocks)
Finally, this proof of functionality
Lags my entire phone.
I didn’t knew this post will be so informative
So what should return?
This should return nothing/error, because in the list,
there isn’t the 0th number.
Probably an empty string.
If so, then I need to debug and add more blocks (and that’s isn’t a good thing)
But we will have to wait for reply from @Yoshi
I have made a solution using 16 blocks
Did 1 million (1,000,000) input lags your phone? I can’t even reach 20000
Yes.I am also not able to get output.
About 6 hours to go, for the “official” answer…
So before we get ‘official’ solution , I would like to post my solution here.
Note: It takes some time to get output for biggest numbers like 1,000,000 but it works normal for bigger numbers like 100,000
Yours is much simplier than me. Good Job! (idk why I was think of
for each number before, but i used
Wow! My phone cannot reach that. It is already 8GB RAM
Some studies say that
for loop is faster and consumes less memory then
Memu android emulator (Android 5.0) with 1 GB ram
Maybe build an apk is better than companion?
I tried your solution, and I still can’t reach 100000