题解列表

筛选

2781: 奇偶ASCII值判断

摘要:解题思路:注意事项:参考代码:while 1:    try:        a = str(input())        if ord(a) % 2 == 0:            print(……

2779: 输出绝对值

摘要:解题思路: 这道题考察的是条件语句的应用注意事项:参考代码:a = float(input())if a >= 0:    print('{:.2f}'.format(a))  #第一……

2778: 判断数正负

摘要:解题思路: while循环控制输入  if条件判断控制范围注意事项:参考代码:while 1:    a = int(input())    if a <= -1E9 or a >= 1E9:   #……

2775: 等差数列末项计算

摘要:解题思路:注意事项:参考代码:a , b , n = map(int,input().strip().split())print(a + (n - 1) * (b - a)) #等差数列公式: an ……

2774: 计算三角形面积

摘要:解题思路:注意事项:参考代码:import mathx1,y1,x2,y2,x3,y3 = map(float,input().strip().split())a = math.sqrt((x1 - ……

2772: 苹果和虫子

摘要:解题思路:注意事项:参考代码:import mathn, x, y = map(int,input().strip().split())print(math.floor(n - y / x))    ……

结构体之成绩统计

摘要:解题思路:注意事项:参考代码:n=int(input())sn=a=b=c=0d=[]for i in range(n):    lis=input().split()    if int(lis[-……

哈哈哈哈哈

摘要:解题思路:注意事项:参考代码:x=list(map(int,input().split()))x.sort(reverse=True)for i in x:    print(i,end=&#39; ……