如果你堅持到這了,哪就為自己鼓掌吧!堅持,你一定可以。
實例51:
題目:學習使用按位與&。

#
!/usr/bin/env python
# --*--coding:utf-8 --*--
'''
需求:學習使用按位與 & 。
思路:0&0=0; 0&1=0; 1&0=0; 1&1=1。
'''
if __name__ == ' __main__ ':
a = 077
b = a & 3
print ' a & b = %d ' % b
b &= 7
print ' a & b = %d ' % b
# --*--coding:utf-8 --*--
'''
需求:學習使用按位與 & 。
思路:0&0=0; 0&1=0; 1&0=0; 1&1=1。
'''
if __name__ == ' __main__ ':
a = 077
b = a & 3
print ' a & b = %d ' % b
b &= 7
print ' a & b = %d ' % b
輸出結果:

a & b = 3
a & b = 3
a & b = 3
實例52:
題目:學習使用按位或|。

#
!/usr/bin/env python
# --*--coding:utf-8 --*--
'''
需求:學習使用按位或|
思路:0|0=0; 0|1=1; 1|0=1; 1|1=1
'''
if __name__ == ' __main__ ':
a = 077
b = a | 3
print ' a | b is %d ' % b
b |= 7
print ' a | b is %d ' % b
# --*--coding:utf-8 --*--
'''
需求:學習使用按位或|
思路:0|0=0; 0|1=1; 1|0=1; 1|1=1
'''
if __name__ == ' __main__ ':
a = 077
b = a | 3
print ' a | b is %d ' % b
b |= 7
print ' a | b is %d ' % b
輸出結果:

a | b
is 63
a | b is 63
a | b is 63
實例53:
題目:學習使用按位異或^.

#
!/usr/bin/env python
# --*--coding:utf-8 --*--
'''
需求:學習使用按位異或 ^ 。
思路:0^0=0; 0^1=1; 1^0=1; 1^1=0
'''
if __name__ == ' __main__ ':
a = 077
b = a ^ 3
print ' The a ^ 3 = %d ' % b
b ^= 7
print ' The a ^ b = %d ' % b
# --*--coding:utf-8 --*--
'''
需求:學習使用按位異或 ^ 。
思路:0^0=0; 0^1=1; 1^0=1; 1^1=0
'''
if __name__ == ' __main__ ':
a = 077
b = a ^ 3
print ' The a ^ 3 = %d ' % b
b ^= 7
print ' The a ^ b = %d ' % b
輸出結果:

The a ^ 3 = 60
The a ^ b = 59
The a ^ b = 59
實例54:
題目:取一個整數a從右端開始的4~7位。

#
!/usr/bin/env python
# --*--coding:utf-8 --*--
'''
需求:取一個整數a從右端開始的4〜7位。
思路:可以這樣考慮:
(1)先使a右移4位。
(2)設置一個低4位全為1,其余全為0的數。可用~(~0<<4)
(3)將上面二者進行&運算。
'''
if __name__ == ' __main__ ':
a = int(raw_input( ' input a number:\n '))
b = a >> 4
c = ~(~0 << 4)
d = b & c
print ' %o\t%o ' %(a,d)
# --*--coding:utf-8 --*--
'''
需求:取一個整數a從右端開始的4〜7位。
思路:可以這樣考慮:
(1)先使a右移4位。
(2)設置一個低4位全為1,其余全為0的數。可用~(~0<<4)
(3)將上面二者進行&運算。
'''
if __name__ == ' __main__ ':
a = int(raw_input( ' input a number:\n '))
b = a >> 4
c = ~(~0 << 4)
d = b & c
print ' %o\t%o ' %(a,d)
輸出結果:

input a number:
45
55 2
45
55 2
實例55:
題目:學習使用按位取反~。

#
!/usr/bin/env python
# --*--coding:utf-8 --*--
'''
需求:學習使用按位取反~。
思路:~0=1; ~1=0;
(1)先使a右移4位。
(2)設置一個低4位全為1,其余全為0的數。可用~(~0<<4)
(3)將上面二者進行&運算。
'''
if __name__ == ' __main__ ':
a = 234
b = ~a
print ' The a\'s 1 complement is %d ' % b
a = ~a
print ' The a\'s 2 complement is %d ' % a
# --*--coding:utf-8 --*--
'''
需求:學習使用按位取反~。
思路:~0=1; ~1=0;
(1)先使a右移4位。
(2)設置一個低4位全為1,其余全為0的數。可用~(~0<<4)
(3)將上面二者進行&運算。
'''
if __name__ == ' __main__ ':
a = 234
b = ~a
print ' The a\'s 1 complement is %d ' % b
a = ~a
print ' The a\'s 2 complement is %d ' % a
輸出結果:

The a
'
s 1 complement is -235
The a ' s 2 complement is -235
The a ' s 2 complement is -235
實例56:
題目:畫圖,學用circle畫圓形。

#
!/usr/bin/env python
# --*--coding:utf-8 --*--
'''
需求:畫圖,學用circle畫圓形。
'''
if __name__ == ' __main__ ':
from Tkinter import *
canvas = Canvas(width=800, height=600, bg= ' yellow ')
canvas.pack(expand=YES, fill=BOTH)
k = 1
j = 1
for i in range(0,40):
canvas.create_oval(310 - k,250 - k,310 + k,250 + k, width=0.5)
k += j
j += 0.3
mainloop()
# --*--coding:utf-8 --*--
'''
需求:畫圖,學用circle畫圓形。
'''
if __name__ == ' __main__ ':
from Tkinter import *
canvas = Canvas(width=800, height=600, bg= ' yellow ')
canvas.pack(expand=YES, fill=BOTH)
k = 1
j = 1
for i in range(0,40):
canvas.create_oval(310 - k,250 - k,310 + k,250 + k, width=0.5)
k += j
j += 0.3
mainloop()
輸出結果:
實例57:
題目:畫圖,學用line畫直線。

#
!/usr/bin/env python
# --*--coding:utf-8 --*--
'''
需求:畫圖,學用line畫直線。
'''
if __name__ == ' __main__ ':
from Tkinter import *
canvas = Canvas(width=300, height=300, bg= ' green ')
canvas.pack(expand=YES, fill=BOTH)
x0 = 263
y0 = 263
y1 = 275
x1 = 275
for i in range(19):
canvas.create_line(x0,y0,x0,y1, width=1, fill= ' red ')
x0 = x0 - 5
y0 = y0 - 5
x1 = x1 + 5
y1 = y1 + 5
x0 = 263
y1 = 275
y0 = 263
for i in range(21):
canvas.create_line(x0,y0,x0,y1,fill = ' red ')
x0 += 5
y0 += 5
y1 += 5
mainloop()
# --*--coding:utf-8 --*--
'''
需求:畫圖,學用line畫直線。
'''
if __name__ == ' __main__ ':
from Tkinter import *
canvas = Canvas(width=300, height=300, bg= ' green ')
canvas.pack(expand=YES, fill=BOTH)
x0 = 263
y0 = 263
y1 = 275
x1 = 275
for i in range(19):
canvas.create_line(x0,y0,x0,y1, width=1, fill= ' red ')
x0 = x0 - 5
y0 = y0 - 5
x1 = x1 + 5
y1 = y1 + 5
x0 = 263
y1 = 275
y0 = 263
for i in range(21):
canvas.create_line(x0,y0,x0,y1,fill = ' red ')
x0 += 5
y0 += 5
y1 += 5
mainloop()
輸出結果:
實例58:
題目:畫圖,學用rectangle畫方形。

#
!/usr/bin/env python
# --*--coding:utf-8 --*--
'''
需求:畫圖,學用rectangle畫方形。
思路:利用for循環控制100-999個數,每個數分解出個位,十位,百位。。
'''
if __name__ == ' __main__ ':
from Tkinter import *
root = Tk()
root.title( ' Canvas ')
canvas = Canvas(root,width = 400,height = 400,bg = ' yellow ')
x0 = 263
y0 = 263
y1 = 275
x1 = 275
for i in range(19):
canvas.create_rectangle(x0,y0,x1,y1)
x0 -= 5
y0 -= 5
x1 += 5
y1 += 5
canvas.pack()
root.mainloop()
# --*--coding:utf-8 --*--
'''
需求:畫圖,學用rectangle畫方形。
思路:利用for循環控制100-999個數,每個數分解出個位,十位,百位。。
'''
if __name__ == ' __main__ ':
from Tkinter import *
root = Tk()
root.title( ' Canvas ')
canvas = Canvas(root,width = 400,height = 400,bg = ' yellow ')
x0 = 263
y0 = 263
y1 = 275
x1 = 275
for i in range(19):
canvas.create_rectangle(x0,y0,x1,y1)
x0 -= 5
y0 -= 5
x1 += 5
y1 += 5
canvas.pack()
root.mainloop()
輸出結果:
實例59:
題目:畫圖,綜合例子。

#
!/usr/bin/env python
# --*--coding:utf-8 --*--
'''
需求:畫圖,綜合例子。
思路:利用for循環控制100-999個數,每個數分解出個位,十位,百位。。
'''
if __name__ == ' __main__ ':
from Tkinter import *
canvas = Canvas(width = 300,height = 300,bg = ' green ')
canvas.pack(expand = YES,fill = BOTH)
x0 = 150
y0 = 100
canvas.create_oval(x0 - 10,y0 - 10,x0 + 10,y0 + 10)
canvas.create_oval(x0 - 20,y0 - 20,x0 + 20,y0 + 20)
canvas.create_oval(x0 - 50,y0 - 50,x0 + 50,y0 + 50)
import math
B = 0.809
for i in range(16):
a = 2 * math.pi / 16 * i
x = math.ceil(x0 + 48 * math.cos(a))
y = math.ceil(y0 + 48 * math.sin(a) * B)
canvas.create_line(x0,y0,x,y,fill = ' red ')
canvas.create_oval(x0 - 60,y0 - 60,x0 + 60,y0 + 60)
for k in range(501):
for i in range(17):
a = (2 * math.pi / 16) * i + (2 * math.pi / 180) * k
x = math.ceil(x0 + 48 * math.cos(a))
y = math.ceil(y0 + 48 + math.sin(a) * B)
canvas.create_line(x0,y0,x,y,fill = ' red ')
for j in range(51):
a = (2 * math.pi / 16) * i + (2* math.pi / 180) * k - 1
x = math.ceil(x0 + 48 * math.cos(a))
y = math.ceil(y0 + 48 * math.sin(a) * B)
canvas.create_line(x0,y0,x,y,fill = ' red ')
mainloop()
# --*--coding:utf-8 --*--
'''
需求:畫圖,綜合例子。
思路:利用for循環控制100-999個數,每個數分解出個位,十位,百位。。
'''
if __name__ == ' __main__ ':
from Tkinter import *
canvas = Canvas(width = 300,height = 300,bg = ' green ')
canvas.pack(expand = YES,fill = BOTH)
x0 = 150
y0 = 100
canvas.create_oval(x0 - 10,y0 - 10,x0 + 10,y0 + 10)
canvas.create_oval(x0 - 20,y0 - 20,x0 + 20,y0 + 20)
canvas.create_oval(x0 - 50,y0 - 50,x0 + 50,y0 + 50)
import math
B = 0.809
for i in range(16):
a = 2 * math.pi / 16 * i
x = math.ceil(x0 + 48 * math.cos(a))
y = math.ceil(y0 + 48 * math.sin(a) * B)
canvas.create_line(x0,y0,x,y,fill = ' red ')
canvas.create_oval(x0 - 60,y0 - 60,x0 + 60,y0 + 60)
for k in range(501):
for i in range(17):
a = (2 * math.pi / 16) * i + (2 * math.pi / 180) * k
x = math.ceil(x0 + 48 * math.cos(a))
y = math.ceil(y0 + 48 + math.sin(a) * B)
canvas.create_line(x0,y0,x,y,fill = ' red ')
for j in range(51):
a = (2 * math.pi / 16) * i + (2* math.pi / 180) * k - 1
x = math.ceil(x0 + 48 * math.cos(a))
y = math.ceil(y0 + 48 * math.sin(a) * B)
canvas.create_line(x0,y0,x,y,fill = ' red ')
mainloop()
輸出結果:
實例60:
題目:計算字符串長度。

#
!/usr/bin/env python
# --*--coding:utf-8 --*--
'''
需求:計算字符串長度
'''
sStr1 = raw_input( ' plase in put: ')
print len(sStr1)
# --*--coding:utf-8 --*--
'''
需求:計算字符串長度
'''
sStr1 = raw_input( ' plase in put: ')
print len(sStr1)
輸出結果:

plase
in put:dfiaoerjf56
11
11
實例61:
題目:打印出楊輝三角(要求打印出10行)

#
!/usr/bin/env python
# --*--coding:utf-8 --*--
'''
需求:打印出楊輝三角形
'''
if __name__ == ' __main__ ':
a = []
for i in range(10):
a.append([])
for j in range(10):
a[i].append(0)
for i in range(10):
a[i][0] = 1
a[i][i] = 1
for i in range(2,10):
for j in range(1,i):
a[i][j] = a[i - 1][j-1] + a[i - 1][j]
from sys import stdout
for i in range(10):
for j in range(i + 1):
stdout.write(str(a[i][j]))
stdout.write( ' ')
print
# --*--coding:utf-8 --*--
'''
需求:打印出楊輝三角形
'''
if __name__ == ' __main__ ':
a = []
for i in range(10):
a.append([])
for j in range(10):
a[i].append(0)
for i in range(10):
a[i][0] = 1
a[i][i] = 1
for i in range(2,10):
for j in range(1,i):
a[i][j] = a[i - 1][j-1] + a[i - 1][j]
from sys import stdout
for i in range(10):
for j in range(i + 1):
stdout.write(str(a[i][j]))
stdout.write( ' ')
輸出結果:

1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
1 5 10 10 5 1
1 6 15 20 15 6 1
1 7 21 35 35 21 7 1
1 8 28 56 70 56 28 8 1
1 9 36 84 126 126 84 36 9 1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
1 5 10 10 5 1
1 6 15 20 15 6 1
1 7 21 35 35 21 7 1
1 8 28 56 70 56 28 8 1
1 9 36 84 126 126 84 36 9 1
實例62:
題目:查找字符串。

#
!/usr/bin/env python
# --*--coding:utf-8 --*--
'''
需求:查找字符串。
'''
sStr1 = ' abcdefg '
sStr2 = ' cde '
print sStr1.find(sStr2)
'''
注:找到是2,未找到是-1
'''
# --*--coding:utf-8 --*--
'''
需求:查找字符串。
'''
sStr1 = ' abcdefg '
sStr2 = ' cde '
print sStr1.find(sStr2)
'''
注:找到是2,未找到是-1
'''
實例63:
題目:畫橢圓ellipse。

#
!/usr/bin/env python
# --*--coding:utf-8 --*--
'''
需求:畫橢圓ellipse。
'''
if __name__ == ' __main__ ':
from Tkinter import *
x = 360
y = 160
top = y - 30
bottom = y - 30
canvas = Canvas(width = 400,height = 600,bg = ' white ')
for i in range(20):
canvas.create_oval(250 - top,250 - bottom,250 + top,250 + bottom)
top -= 5
bottom += 5
canvas.pack()
mainloop()
# --*--coding:utf-8 --*--
'''
需求:畫橢圓ellipse。
'''
if __name__ == ' __main__ ':
from Tkinter import *
x = 360
y = 160
top = y - 30
bottom = y - 30
canvas = Canvas(width = 400,height = 600,bg = ' white ')
for i in range(20):
canvas.create_oval(250 - top,250 - bottom,250 + top,250 + bottom)
top -= 5
bottom += 5
canvas.pack()
mainloop()
輸出結果:
實例64:
題目:利用ellipse和rectangle畫圖。

#
!/usr/bin/env python
# --*--coding:utf-8 --*--
'''
需求:利用ellipse 和 rectangle 畫圖。
'''
if __name__ == ' __main__ ':
from Tkinter import *
canvas = Canvas(width = 400,height = 600,bg = ' white ')
left = 20
right = 50
top = 50
num = 15
for i in range(num):
canvas.create_oval(250 - right,250 - left,250 + right,250 + left)
canvas.create_oval(250 - 20,250 - top,250 + 20,250 + top)
canvas.create_rectangle(20 - 2 * i,20 - 2 * i,10 * (i + 2),10 * ( i + 2))
right += 5
left += 5
top += 10
canvas.pack()
mainloop()
# --*--coding:utf-8 --*--
'''
需求:利用ellipse 和 rectangle 畫圖。
'''
if __name__ == ' __main__ ':
from Tkinter import *
canvas = Canvas(width = 400,height = 600,bg = ' white ')
left = 20
right = 50
top = 50
num = 15
for i in range(num):
canvas.create_oval(250 - right,250 - left,250 + right,250 + left)
canvas.create_oval(250 - 20,250 - top,250 + 20,250 + top)
canvas.create_rectangle(20 - 2 * i,20 - 2 * i,10 * (i + 2),10 * ( i + 2))
right += 5
left += 5
top += 10
canvas.pack()
mainloop()
輸出結果:
實例65:
題目:一個最優美的團。

#
!/usr/bin/env python
# --*--coding:utf-8 --*--
'''
需求:一個最優美的圖案。
'''
import math
class PTS:
def __init__(self):
self.x = 0
self.y = 0
points = []
def LineToDemo():
from Tkinter import *
screenx = 400
screeny = 400
canvas = Canvas(width = screenx,height = screeny,bg = ' white ')
AspectRatio = 0.85
MAXPTS = 15
h = screeny
w = screenx
xcenter = w / 2
ycenter = h / 2
radius = (h - 30) / (AspectRatio * 2) - 20
step = 360 / MAXPTS
angle = 0.0
for i in range(MAXPTS):
rads = angle * math.pi / 180.0
p = PTS()
p.x = xcenter + int(math.cos(rads) * radius)
p.y = ycenter - int(math.sin(rads) * radius * AspectRatio)
angle += step
points.append(p)
canvas.create_oval(xcenter - radius,ycenter - radius,
xcenter + radius,ycenter + radius)
for i in range(MAXPTS):
for j in range(i,MAXPTS):
canvas.create_line(points[i].x,points[i].y,points[j].x,points[j].y)
canvas.pack()
mainloop()
if __name__ == ' __main__ ':
LineToDemo()
# --*--coding:utf-8 --*--
'''
需求:一個最優美的圖案。
'''
import math
class PTS:
def __init__(self):
self.x = 0
self.y = 0
points = []
def LineToDemo():
from Tkinter import *
screenx = 400
screeny = 400
canvas = Canvas(width = screenx,height = screeny,bg = ' white ')
AspectRatio = 0.85
MAXPTS = 15
h = screeny
w = screenx
xcenter = w / 2
ycenter = h / 2
radius = (h - 30) / (AspectRatio * 2) - 20
step = 360 / MAXPTS
angle = 0.0
for i in range(MAXPTS):
rads = angle * math.pi / 180.0
p = PTS()
p.x = xcenter + int(math.cos(rads) * radius)
p.y = ycenter - int(math.sin(rads) * radius * AspectRatio)
angle += step
points.append(p)
canvas.create_oval(xcenter - radius,ycenter - radius,
xcenter + radius,ycenter + radius)
for i in range(MAXPTS):
for j in range(i,MAXPTS):
canvas.create_line(points[i].x,points[i].y,points[j].x,points[j].y)
canvas.pack()
mainloop()
if __name__ == ' __main__ ':
LineToDemo()
輸出結果:
實例66:
題目:輸入3個數a,b,c,按大小順從輸出。

#
!/usr/bin/env python
# --*--coding:utf-8 --*--
'''
需求:輸入3個數a,b,c,按大小順序輸出。
'''
if __name__ == ' __main__ ':
n1 = int(raw_input( ' n1 = :\n '))
n2 = int(raw_input( ' n2 = :\n '))
n3 = int(raw_input( ' n3 = :\n '))
def swap(p1,p2):
return p2,p1
if n1 > n2 : n1,n2 = swap(n1,n2)
if n1 > n3 : n1,n3 = swap(n1,n3)
if n2 > n3 : n2,n3 = swap(n2,n3)
print n1,n2,n3
# --*--coding:utf-8 --*--
'''
需求:輸入3個數a,b,c,按大小順序輸出。
'''
if __name__ == ' __main__ ':
n1 = int(raw_input( ' n1 = :\n '))
n2 = int(raw_input( ' n2 = :\n '))
n3 = int(raw_input( ' n3 = :\n '))
def swap(p1,p2):
return p2,p1
if n1 > n2 : n1,n2 = swap(n1,n2)
if n1 > n3 : n1,n3 = swap(n1,n3)
if n2 > n3 : n2,n3 = swap(n2,n3)
print n1,n2,n3
輸出結果:

n1 = :
56
n2 = :
89
n3 = :
23
23 56 89
56
n2 = :
89
n3 = :
23
23 56 89
實例67:
題目:輸入數組,最大的與第一個元素交換,最小的與最后一個元素交換,輸出數組。

#
!/usr/bin/env python
# --*--coding:utf-8 --*--
'''
需求:輸入數組,最大的與第一個元素交換,最小的與最后一個元素交換,輸出數組。
'''
def inp(numbers):
for i in range(9):
numbers.append(int(raw_input( ' input a number:\n ')))
numbers.append(int(raw_input( ' input a number:\n ')))
p = 0
def max_min(array):
max = min = 0
for i in range(1,len(array) - 1):
p = i
if array[p] > array[max] : max = p
elif array[p] < array[min] : min = p
k = max
l = min
array[0],array[l] = array[l],array[0]
array[9],array[k] = array[k],array[9]
def outp(numbers):
for i in range(len(numbers)):
print numbers[i]
if __name__ == ' __main__ ':
array = []
inp(array)
max_min(array)
outp(array)
# --*--coding:utf-8 --*--
'''
需求:輸入數組,最大的與第一個元素交換,最小的與最后一個元素交換,輸出數組。
'''
def inp(numbers):
for i in range(9):
numbers.append(int(raw_input( ' input a number:\n ')))
numbers.append(int(raw_input( ' input a number:\n ')))
p = 0
def max_min(array):
max = min = 0
for i in range(1,len(array) - 1):
p = i
if array[p] > array[max] : max = p
elif array[p] < array[min] : min = p
k = max
l = min
array[0],array[l] = array[l],array[0]
array[9],array[k] = array[k],array[9]
def outp(numbers):
for i in range(len(numbers)):
print numbers[i]
if __name__ == ' __main__ ':
array = []
inp(array)
max_min(array)
outp(array)
輸出結果:

input a number:
45
input a number:
59
input a number:
34
input a number:
26
input a number:
98
input a number:
2
input a number:
36
input a number:
49
input a number:
28
input a number:
65
2
59
34
26
65
45
36
49
28
98
45
input a number:
59
input a number:
34
input a number:
26
input a number:
98
input a number:
2
input a number:
36
input a number:
49
input a number:
28
input a number:
65
2
59
34
26
65
45
36
49
28
98
實例68:
題目:有n個整數,使其前面各數順序向后移m個位置,最后m個數變成最前面的m個數。

#
!/usr/bin/env python
# --*--coding:utf-8 --*--
'''
需求:有n個整數,使其前面各數順序向后移m個位置,最后m個數變成最前面的m個數
'''
if __name__ == ' __main__ ':
n = int(raw_input( ' the total number is:\n '))
m = int(raw_input( ' back m:\n '))
def move(array,n,m):
array_end = array[n - 1]
for i in range(n - 1,-1,- 1):
array[i] = array[i - 1]
array[0] = array_end
m -= 1
if m > 0:move(array,n,m)
number = []
for i in range(n):
number.append(int(raw_input( ' input a number:\n ')))
print ' orignal number: ',number
move(number,n,m)
print ' after moved: ',number
# --*--coding:utf-8 --*--
'''
需求:有n個整數,使其前面各數順序向后移m個位置,最后m個數變成最前面的m個數
'''
if __name__ == ' __main__ ':
n = int(raw_input( ' the total number is:\n '))
m = int(raw_input( ' back m:\n '))
def move(array,n,m):
array_end = array[n - 1]
for i in range(n - 1,-1,- 1):
array[i] = array[i - 1]
array[0] = array_end
m -= 1
if m > 0:move(array,n,m)
number = []
for i in range(n):
number.append(int(raw_input( ' input a number:\n ')))
print ' orignal number: ',number
move(number,n,m)
print ' after moved: ',number
輸出結果:

the total number
is:
3
back m:
26
input a number:
46
input a number:
35
input a number:
16
orignal number: [46, 35, 16]
after moved: [35, 16, 46]
3
back m:
26
input a number:
46
input a number:
35
input a number:
16
orignal number: [46, 35, 16]
after moved: [35, 16, 46]
實例69:
題目:有n個人圍成一圈,順序排號。從第一個人開始報數(從1到3報數),凡報到3的人退出圈子,問最后留下來的原來是第幾號的那位。