+ 2
Whats wrong?
https://code.sololearn.com/cf4pGGy1djm8/?ref=app Question: if the last digit of any number is moved in front of the number, it should be the double of the original number. Note: The solution has about 18 digits.
7 odpowiedzi
+ 4
The digit most right detemines all other digits.
u need 8 tries since 0 and 1 cant be last digits.
eg if last digit is 4, the last digit of double number must be 8.
this is the second digit from left.
so we have 84
now third from left must be 6 (2*8)%10
684
next (2*6+1)%10...
3684
next
73684
next
473684
next
9473684
...
https://code.sololearn.com/cOzuTRMzu43l
+ 4
105263157894736842
157894736842105263
210526315789473684
263157894736842105
368421052631578947
421052631578947368
473684210526315789
+ 3
Your code times out long before 18 digit numbers are reached.
+ 3
Steve I don't know, I guessed.
Nice challenge BTW.
+ 3
What's the problem?
+ 2
It seems the number are diferent...try with a narroe range
https://code.sololearn.com/citVKyCa4ibk/?ref=app
+ 1
Oma Falk After seeing your response I have to say that it's amazing to me that you even understood the question enough to know that was what was wanted. So doubly amazing on your part!