Ejercicios avanzados de Huitong Education-Python tercer nivel

'''第三关'''
# 买水果
# st = input()
# a = st.split()[0]
# b = st.split()[1]
# a = int(a)
# b = int(b)
# a in range (1, 21)
# b in range(4,21)
# for i in range(100,100000):
#     if i%a == 0 and i % b ==3:
#         print(i)
#         break
#
# and和or
# st = input()
# a = st.split()[0]
# b = st.split()[1]
# a = int(a)
# b = int(b)
# if (a % 2 == 0 and b % 2 == 0) or (a % 3 == 0  and b % 3 == 0):
#     print('1')
# else:
#     print('0')

# 在区间里
# st = input()
# a = st.split()[0]
# b = st.split()[1]
# c = st.split()[2]
# a = int(a)
# b = int(b)
# c = int(c)
# if c in range(a,b):
#     print('in')
# else:
#     print('out')

# 区间交集
# st = input()
# a1 = st.split()[0]
# b1 = st.split()[1]
# a2 = st.split()[2]
# b2 = st.split()[3]
# c = st.split()[4]
# a1 = int(a1)
# b1 = int(b1)
# a2 = int(a2)
# b2 = int(b2)
# c = int(c)
# if c in range(a1,b1+1) or c in range(a2,b2+1):
#     print('in')
# else:
#     print('out')

# 区间交集
# st = input()
# a1 = st.split()[0]
# b1 = st.split()[1]
# a2 = st.split()[2]
# b2 = st.split()[3]
# c = st.split()[4]
# a1 = int(a1)
# b1 = int(b1)
# a2 = int(a2)
# b2 = int(b2)
# c = int(c)
#
# if c in range(a1,b1) and c in range(a2,b2):
#     print('in')
# else:
#     print('out')

# 最大值
# st = input()
# a = st.split()[0]
# b = st.split()[1]
# c = st.split()[2]
# a = int(a)
# b = int(b)
# c = int(c)
#
# tuple = (a,b,c)
# print(max(tuple))

# 3数排序
# st = input()
# a = st.split()[0]
# b = st.split()[1]
# c = st.split()[2]
# a = int(a)
# b = int(b)
# c = int(c)
# if a>b>c:
#     print(a,b,c)
# elif b>a>c:
#     print(b,a,c)
# elif a>c>b:
#     print(a,c,b)
# elif b>c>a:
#     print(b,c,a)
# elif c>b>a:
#     print(c,b,a)
# else:
#     print(c,a,b)

# 求最小值
# st = input()
# a = st.split()[0]
# b = st.split()[1]
# c = st.split()[2]
# d = st.split()[3]
# a = int(a)
# b = int(b)
# c = int(c)
# d = int(d)
#
# tuple = (a,b,c,d)
# print(min(tuple))

# 排名
# st = input()
# a = st.split()[0]
# b = st.split()[1]
# c = st.split()[2]
# a = int(a)
# b = int(b)
# c = int(c)
# if a>b>c:
#     print(c,b,a)
# elif b>a>c:
#     print(c,a,b)
# elif a>c>b:
#     print(b,c,a)
# elif b>c>a:
#     print(a,c,b)
# elif c>b>a:
#     print(a,b,c)
# else:
#     print(b,a,c)

# 中间数
# st = input()
# a = st.split()[0]
# b = st.split()[1]
# c = st.split()[2]
# a = int(a)
# b = int(b)
# c = int(c)
# if a>b>c or c>b>a:
#     print(b)
# elif b>a>c or c>a>b:
#     print(a)
# else:
#     print(c)


# 判断闰年
# st = input()
# years = st.split()[0]
# years = int(years)
# if (years % 4 == 0 and years % 100 != 0) or (years % 400 == 0):
#     print("yes")
# else:
#     print("no")

# 天数
# st = input()
# y = st.split()[0]
# d = st.split()[1]
# y = int(y)
# d = int(d)
# count = 0
# m = 12
# if ((y % 4 == 0 and y % 100 != 0) or (y % 400 == 0)):
#         count = 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30 + d
# else:
#         count = 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30 + d
# print(count)

913.1 o 2 (curso 8)

Descripción del Título

Mengmeng solo tiene 2 años. Cuando ve la NBA, le interesan los números de los jugadores, pero solo conoce los números "1" y "2". Si hay números "1" o "2" en los números , Mengmeng estará emocionado, gritó. Ahora, Mengmeng ve el número de jugadores N. ¿Qué números harán que Mengmeng grite?

Formato de entrada

 1 entero positivo en la primera línea: N, en el rango [1,10].
 N enteros en la segunda línea: cada entero varía en [1,99]

Formato de salida

Una línea que contiene números enteros de '1' o '2'.

Ejemplo de entrada / salida 1

ingresar:

5
3 11 4 44 25

Producción:

11 25

(Si hay tipos grandes que conocen esta pregunta, por favor comente el código de esta pregunta, muchas gracias ~~) Los principiantes están aprendiendo ~~

Supongo que te gusta

Origin blog.csdn.net/weixin_44940488/article/details/107600765
Recomendado
Clasificación