추가 '3-3 (미완)'
This commit is contained in:
parent
ec984d3c5b
commit
6420dc6114
|
|
@ -0,0 +1,28 @@
|
||||||
|
import random
|
||||||
|
r = random.randint(1, 10)
|
||||||
|
s=[]
|
||||||
|
s.sort()
|
||||||
|
result=[]
|
||||||
|
t=0
|
||||||
|
x=1
|
||||||
|
|
||||||
|
while t<8:
|
||||||
|
s.append(r)
|
||||||
|
r=random.randint(1, 10)
|
||||||
|
t+=1
|
||||||
|
|
||||||
|
s.sort()
|
||||||
|
t=0
|
||||||
|
|
||||||
|
for a in s:
|
||||||
|
t+=x
|
||||||
|
while t<len(s):
|
||||||
|
k = abs(a-s[t])
|
||||||
|
result.append(k)
|
||||||
|
t+=1
|
||||||
|
x+=1
|
||||||
|
t=0
|
||||||
|
|
||||||
|
for j in result:
|
||||||
|
if k < j:
|
||||||
|
print('(' + str(a) + ', ' + str(s[t]) + ')')
|
||||||
Loading…
Reference in New Issue