20 lines
519 B
Python
20 lines
519 B
Python
import requests
|
|
|
|
x = requests.get('http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing=12345')
|
|
|
|
list = x.text.split()
|
|
print(list[-1])
|
|
|
|
while True:
|
|
if x.text != "Yes. Divide by two and keep going.":
|
|
x = requests.get('http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing='+list[-1])
|
|
|
|
list = x.text.split()
|
|
print("start ", x.text)
|
|
else:
|
|
div = 16044/2
|
|
x = requests.get('http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing='+str(div))
|
|
|
|
list = x.text.split()
|
|
print("next ", x.text)
|