2787: 有一门课不及格的学生 摘要:解题思路:注意事项:参考代码:import sysa , b = map(int,input().strip().split())if a < 0 or a > 100 or b < 0 or b >…… 题解列表 2022年11月29日 0 点赞 2 评论 644 浏览 评分:9.9
2786: 判断能否被3、5、7整除 摘要:解题思路:不用循环,只用条件判断语句注意事项:参考代码:a = int(input())if a % 3 == 0 and a % 5 == 0 and a % 7 == 0: print(&#…… 题解列表 2022年11月29日 0 点赞 0 评论 712 浏览 评分:2.0
2785: 判断一个数能否同时被3和5整除 摘要:解题思路:注意事项:参考代码:import sysa = int(input())if a < -1000000 or a > 1000000: sys.exit() …… 题解列表 2022年11月29日 0 点赞 0 评论 509 浏览 评分:8.0
有点繁琐,不过有注释 摘要:参考代码:ISBN=input()x=ISBN.replace('-','') #把ISBN号的-去除X=[] #存储ISBN号尾不为X的ISBN数字a="" #存储I…… 题解列表 2022年11月28日 0 点赞 0 评论 411 浏览 评分:0.0
2782: 整数大小比较 摘要:while 1: try: while 1: x,y = map(int,input().strip().split()) if (x …… 题解列表 2022年11月27日 0 点赞 0 评论 444 浏览 评分:0.0
编写题解 1030: [编程入门]二维数组的转置 摘要:解题思路:将数组处理为最原始的样子(也就[[1,2,3],[4,5,6],[7,8,9]])注意事项:理解二维数组的运算方式参考代码:lst = []for i in range(3): j =…… 题解列表 2022年11月27日 0 点赞 0 评论 712 浏览 评分:9.9
2781: 奇偶ASCII值判断 摘要:解题思路:注意事项:参考代码:while 1: try: a = str(input()) if ord(a) % 2 == 0: print(…… 题解列表 2022年11月27日 0 点赞 0 评论 444 浏览 评分:0.0
2779: 输出绝对值 摘要:解题思路: 这道题考察的是条件语句的应用注意事项:参考代码:a = float(input())if a >= 0: print('{:.2f}'.format(a)) #第一…… 题解列表 2022年11月27日 0 点赞 0 评论 647 浏览 评分:2.0
2778: 判断数正负 摘要:解题思路: while循环控制输入 if条件判断控制范围注意事项:参考代码:while 1: a = int(input()) if a <= -1E9 or a >= 1E9: #…… 题解列表 2022年11月27日 0 点赞 0 评论 478 浏览 评分:2.0
编写题解 1046: [编程入门]自定义函数之数字后移(有细致的讲解) 摘要:解题思路:注意事项:参考代码:# index,在列表某一确定位置插入确定的东西(insert() 方法在指定位置插入指定的值。),# pop() 函数用于移除列表中的一个元素(默认最后一个元素),并且…… 题解列表 2022年11月26日 0 点赞 0 评论 362 浏览 评分:0.0