[编程入门]水仙花数判断 最基础解法 摘要:解题思路:bw=i//100 sw=(i-bw*100)//10 gw=i-bw*100-sw*10注意事项:参考代码: for i in range(100,1000): bw=i…… 题解列表 2022年10月18日 0 点赞 0 评论 378 浏览 评分:7.0
编写题解 2782: 整数大小比较 摘要:解题思路:注意事项:参考代码:x,y=map(int,input().split()) if x>y: print('>') elif x==y: print(…… 题解列表 2022年10月18日 0 点赞 0 评论 1178 浏览 评分:9.9
编写题解 2780: 奇偶数判断 摘要:解题思路:注意事项:参考代码:n=int(input()) if n%2!=0: print('odd') else: print('even'…… 题解列表 2022年10月18日 1 点赞 0 评论 1453 浏览 评分:9.9
编写题解 2781: 奇偶ASCII值判断 摘要:解题思路:注意事项:参考代码:a=input() if ord(a)%2!=0: print('YES') else: print('NO')…… 题解列表 2022年10月18日 0 点赞 0 评论 941 浏览 评分:8.3
编写题解 2779: 输出绝对值 摘要:解题思路:注意事项:参考代码:print('%.2f'%abs(float(input()))) #print('{:.2f}'.format(abs(float(i…… 题解列表 2022年10月18日 1 点赞 0 评论 1416 浏览 评分:5.6
编写题解 2778: 判断数正负 摘要:解题思路:科学计数法的使用,while循环控制范围,不满足用break终止循环注意事项:参考代码:N=int(input()) while N>=-1E9 and N<=1E9: if N…… 题解列表 2022年10月18日 0 点赞 0 评论 1539 浏览 评分:9.9
编写题解 2765: 计算分数的浮点数值 摘要:解题思路:保留小数点位数常用方法:1.'%.9f'%n2.'{:.9f}'.format(n)注意事项:参考代码:a,b=map(int,input().split()…… 题解列表 2022年10月18日 3 点赞 0 评论 2153 浏览 评分:9.9
编写题解 2764: 带余除法 摘要:解题思路:整除://求余:%注意事项:参考代码:a,b=map(int,input().split()) while b!=0: #当除数非0,进入while循环 print(a//b,a…… 题解列表 2022年10月18日 0 点赞 0 评论 1236 浏览 评分:9.7
编写题解 2762: 计算(a+b)*c的值 摘要:解题思路:注意事项:参考代码:a,b,c=map(int,input().split()) print((a+b)*c)…… 题解列表 2022年10月18日 0 点赞 0 评论 1088 浏览 评分:9.1
编写题解 1267: A+B Problem 摘要:解题思路:注意事项:参考代码:a,b=map(int,input().split())#map()方法将字符串转化为整型 print(a+b)…… 题解列表 2022年10月18日 0 点赞 0 评论 784 浏览 评分:9.3