我個人認為從這一個單元開始,就需要多動一點腦袋
a = int(input())
i = 1
while(i**2<=a):
print(i**2)
i += 1
number = int(input())
if number == 2:
print(number)
else:
if (number % 2 == 0):
i = 2
while i <= number:
if number % i == 0 :
print(i)
break
i+=2
else:
i = 3
while i <= number:
if number % i == 0 :
print(i)
break
i+=2
a = int(input())
i = 1
while(2**i <= a):
i += 1
print(i-1)
print(2**(i-1))
x = int(input())
y = int(input())
i = 1
while (x < y):
x += 0.1*x
i+=1
print(i)
l = 0
while True:
i = int(input())
if i == 0:
break
else:
l += 1
print(l)
s = 0
while True:
i = int(input())
if i == 0:
break
else:
s += i
print(s)
s = 0
l = 0
while True:
i = int(input())
if i == 0:
break
else:
s += i
l += 1
print(s/l)
s = 0
b = 0
while True:
i = int(input())
if i == 0:
break
else:
if i > b:
b = i
print(b)
s = 0
b = 0
l = 0
a = 0
while True:
i = int(input())
if i == 0:
break
else:
if i > b:
b = i
a = l
l += 1
print(a+1)
i = 0
a = 0
while True:
i = int(input())
if i == 0:
break
elif i%2 == 0:
a += 1
print(a)
i = 0
a = 0
c = 0
while True:
i = int(input())
if i == 0:
break
elif a < i :
c += 1
a = i
print(c-1)
f = int(input())
s= int(input())
if f < s:
f, s = s, f
i = int(input())
while i != 0:
if i > f:
s, f = f, i
elif i > s:
s = i
i = int(input())
print(s)
s = 0
b = 0
c = 0
while True:
i = int(input())
if i == 0:
break
else:
if i >= b:
if i == b:
c += 1
else:
b = i
c = 0
print(c+1)
i = int(input())
if i == 0:
print(0)
else:
p, n = 0, 1
j = 2
while (j<=i):
p, n = n, n+p
j += 1
print(n)
a = int(input())
flag = 0
b = [0, 1]
for i in range(1,100,1):
b.append(b[i] + b[i-1])
for i in range(0, 100, 1):
if (b[i] == a):
print(i)
flag = 1
break
if (flag == 0):
print(-1)
p = 0
a = 1
m = 1
while True:
i = int(input())
if i ==0:
break
elif i == p:
a += 1
m = max(a, m)
else:
a = 1
p = i
print(m)