추가 '3-3 (미완)'

This commit is contained in:
kim_yubin 2018-11-09 20:33:49 +09:00
parent ec984d3c5b
commit 6420dc6114
1 changed files with 28 additions and 0 deletions

28
3-3 (미완) Normal file
View File

@ -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]) + ')')