慧通教育——python进阶习题第三关

'''第三关'''
# 买水果
# 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或2 (课程8)

题目描述

萌萌才2岁,观看NBA时,对队员身上的号码感兴趣,可她只认识数字’1’和’2’,如果号码中有数字’1’或数字’2’,萌萌就会兴奋的大叫。现在,萌萌看到电视画面上有N个队员的号码,请问哪些号码会让萌萌大叫?

输入格式

 第一行1个正整数:N,范围在[1,10]。
 第二行N个整数:每个整数范围在[1,99]

输出格式

一行,包含’1’或’2’的整数。

输入/输出例子1

输入:

5
3  11  4  44  25

输出:

11  25

(如有会此题的大佬,欢迎将此题代码评论给出,多谢多谢~~)初学者正在学习中~~

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

简时刻

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值