try:
while True:
a=input()
a=a.split()
b=[]
count=0
if len(a)==2:
print("Jolly")
continue
for i in range(1,len(a)-1):
b.append(abs(int(a[i])-int(a[i+1])))
print(b)
for j in range(1,int(a[0])):
for k in b:
print(j,k)
if j==k:
count=1
break
else :
count=0
if count==0:
break
#print(count)
if count!=0:
print("Jolly")
else :
print("Not jolly")
except:
pass
try:
while True:
a=input()
a=a.split()
b=[]
count=0
if len(a)==2:
print("Jolly")
continue
for i in range(1,len(a)-1):
b.append(abs(int(a[i])-int(a[i+1])))
print(b)
for j in range(1,int(a[0])):
for k in b:
print(j,k)
if j==k:
count=1
break
else :
count=0
if count==0:
break
#print(count)
if count!=0:
print("Jolly")
else :
print("Not jolly")
except:
pass
女生我不回
for j in range(1,int(a[0])):
for k in b:
print(j,k)
if j==k:
count=1
break
else :
count=0
if count==0:
break
這裡很奇怪,我不懂你要做什麼,建議直接排序再檢查
for j in range(1,int(a[0])):
for k in b:
print(j,k)
if j==k:
count=1
break
else :
count=0
if count==0:
break
這裡很奇怪,我不懂你要做什麼,建議直接排序再檢查
其實這裡就錯了
if len(a)==2:
print("Jolly")
continue