Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Uncategorized category for Ore In The Desert by TovarischZhukov
data=set()
def checkio(previous):
global data
new_data=set()
if previous:
r=previous[-1][-1]
xc=previous[-1][0]
yc=previous[-1][1]
for i in range(10):
for j in range(10):
if (j-yc)**2+(i-xc)**2<=(r+.5)**2 and (j-yc)**2+(i-xc)**2>(r-.5)**2:
new_data.add((i,j))
if data: data=data.intersection(new_data)
else: data=new_data
return list(list(data)[0]) if data else [0,0]
Jan. 29, 2016
Comments: